Redirect Rule
milin korath
milinkorath at gmail.com
Sat Jul 9 16:49:04 MSD 2011
Hello
I am running my djago application in nginx server. In my configuration I
redirect all http to https using the below settings
location / { rewrite ^/(.*) https://mydomain.com/$1 permanent; }
What i want is i need to redirect to all my http request to https except
only one url like http://mydomain.com/x/y.
I tried
location ~* / {
rewrite ^/(.*) https://mydomain.com/$1 permanent;
}
location = mydomain.com/x/y {
rewrite ^/(.*) http://mydomain.com/$1 permanent;
}
But no luck.Can you please advice me what went wrong here.Really i am struck
with this.
Thanks
Milin Korath
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110709/e1b9bda8/attachment.html>
More information about the nginx
mailing list