Welcome! Log In Create A New Profile

Advanced

Redirect Rule

milin korath
July 09, 2011 08:50AM
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
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Redirect Rule

milin korath July 09, 2011 08:50AM

Re: Redirect Rule

Maxim Dounin July 09, 2011 09:24AM

Re: Redirect Rule

milin korath July 09, 2011 12:12PM

Re: Redirect Rule

Maxim Dounin July 09, 2011 01:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 145
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready