https rewrite for subdirectory only

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


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


Best regards

Using Opera's revolutionary e-mail client:

More information about the nginx mailing list