abc.com/nginx.text rewrite www.abc.com/nginx.text service_name abc.com www.atans.com if ($host = 'abc.com' ) { rewrite ^/(.*)$ http://www.abc.com/$1 permanent; } Is this rewrite rule right? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,40554,40554#msg-40554