https rewrite for subdirectory only

gunawan satemie at gmail.com
Sun Dec 26 08:20:30 MSK 2010


Hi,

I'm a noob.

How to rewrite http to https in /admin location only ?

I put something like this in nginx.conf :
location /admin {
     rewrite     ^(.*)   https://$server_name$1 permanent;
}

But I always get error message "The page isn't redirecting properly" in  
Firefox when I browse http://$server_name/admin

Thanks.

Best regards

Gunawan
-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the nginx mailing list