https rewrite for subdirectory only

Edho P Arief edhoprima at gmail.com
Sun Dec 26 12:23:37 MSK 2010


On Sun, Dec 26, 2010 at 12:20 PM, gunawan <satemie at gmail.com> wrote:
>
> 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
>


...how about posting the full config file you're using.



More information about the nginx mailing list