Redirecting from mysite.com to www.mysite.com

Thomas iamkenzo at gmail.com
Fri Sep 19 00:50:18 MSD 2008


UPDATE: sorry, I had forgotten to add mysite.com to /etc/hosts, so now
redirection works.

But if I put server_name _; back then I get the loop.

I tried using this trick: http://www.ruby-forum.com/topic/152330

 with server_name_in_redirect  off;

 but I still get the infinite loop.

Do I need to explicitly create a server_name for each domain I am
handling? I would like to be able to create an unattended config file
that I won't "ever" touch again.





More information about the nginx mailing list