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

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