zeldor.biz

Linux, programming and more

Copyright © 2021
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

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY Fedora FTP Fun GIT Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID Roundcube rsync security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *