:: How to redirect www to non-www domain in nginx
+ edit nginx.conf or your virtualhost file
|
0 |
vi /etc/nginx/nginx.conf |
+ add redirecting on server {}
|
0 1 2 |
if ($host = 'www.blackonsole.org') { rewrite ^/(.*)$ http://blackonsole.org/$1 permanent; } |
+ reload nginx
|
0 |
nginx -s reload |
