zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

NginX redirect to Facebook

November 13, 2012 by Igor Drobot Leave a Comment

This is my live example of permanent (301) redirection to external URL with Nginx, all incoming requests will be redirected to a Facebook group.

cat /etc/nginx/sites-enabled/domain.de

1
2
3
4
5
6
7
8
9
10
server {
        server_name  domain.de www.domain.de;
	listen   [::]:80;
	server_tokens off;
 
location / {
	rewrite ^ http://www.facebook.com/groups/399191/ permanent;
}
 
}

server { server_name domain.de www.domain.de; listen [::]:80; server_tokens off; location / { rewrite ^ http://www.facebook.com/groups/399191/ permanent; } }

Filed Under: Linux Tagged With: 301 redirect, facebook, Nginx, redirect

Redirect incomming links with .htaccess

August 20, 2010 by Igor Drobot Leave a Comment

Redirect incoming links with .htaccess to prevent duplicate content penalties

Create a .htaccess file under htdocs, with following content

1
2
RewriteEngine on
RewriteRule ^(.*)$ http://www.zeldor.biz/$1 [L,R=301]

RewriteEngine on RewriteRule ^(.*)$ http://www.zeldor.biz/$1 [L,R=301]

Each request to your site will be redirected to www.zeldor.biz

Filed Under: Linux Tagged With: .htaccess, 301 redirect, redirect, RewriteRule

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok