View Single Post
  #4  
Old 9th July 2013, 14:58
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 68
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko View Post
www to non-www:

Code:
if ($http_host != "example.com") {
  rewrite ^ $scheme://example.com$request_uri? permanent;
}
non-www to www:

Code:
if ($http_host != "www.example.com") {
  rewrite ^ $scheme://www.example.com$request_uri? permanent;
}
Cheers!

Thank you very much.
Reply With Quote