7 messages in ru.sysoev.nginxredirect from www to sub-page
FromSent OnAttachments
ha weJan 22, 2009 3:15 am 
Igor SysoevJan 22, 2009 3:18 am 
Maxim DouninJan 22, 2009 3:26 am 
Marcin KasperskiJan 22, 2009 9:23 am 
Igor SysoevJan 22, 2009 10:37 am 
Marcin KasperskiJan 22, 2009 12:59 pm 
Igor SysoevJan 23, 2009 1:44 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:redirect from www to sub-pageActions...
From:ha we (lis@ruby-forum.com)
Date:Jan 22, 2009 3:15:12 am
List:ru.sysoev.nginx

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.