redirect from www to sub-page

ha we lists at ruby-forum.com
Thu Jan 22 14:15:35 MSK 2009


Hi!

How can I redirect from www.example.com to www.example.com/new_location,
but do not redirect if there is already a full address such as
www.example.com/location?

I tried this

   if ($host ~* "^www.example.com$"){
      rewrite ^(.*)$ http://www.example.com/new_location break;
   }

But of courese it creates an infinite loop.

Thanks,
H.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list