Hi, I'm trying to rewrite 'www.somedomain.com:8080' to 'somedomain.com:8080' but when I use the below, it doesn't work. Any ideas? :) if ($host != "somedomain.com:8080" ) { rewrite ^/(.*)$ "http://somedomain.com:8080/$1" permanent; } Posted at Nginx Forum: http://forum.nginx.org/read.php?2,159859,159859#msg-159859