You can easily redirect www to nowww domain for SEO and other purposes using the following syntax. Edit nginx.conf file, enter:
# vi /usr/local/nginx/conf/nginx.conf
To force www.theos.in/page.html to theos.in/page.html, enter:
### redirect www to nowww with client code 301 ###Save and close the file. Test and reload nginx webserver, enter:
if ($host = 'www.theos.in' ) {
rewrite ^/(.*)$ http://theos.in/$1 permanent;
}
# /usr/local/nginx/sbin/nginx -s reload
Fire a webbrowser and type the url:
http://www.theos.in/windows-xp/free-fast-public-dns-server-list/
It should be redirected to
http://theos.in/windows-xp/free-fast-public-dns-server-list/
No comments:
Post a Comment