Welcome! Log In Create A New Profile

Advanced

Help with specific redirect to https

Pete Ashdown
December 12, 2012 11:14AM
I'm trying to redirect anyURL that contains "UserLogin" (ie: Mediawiki) to
https. This is what I've tried:

rewrite .*UserLogin.* https://domain.com$request_uri? permanent;
----
rewrite UserLogin https://domain.com$request_uri? permanent;
----
rewrite ^.*UserLogin.*$ https://domain.com$request_uri? permanent;
----
location ~* .*UserLogin.* {
return 301 https://domain.com$request_uri;
}
----
location ~ .*UserLogin.* {
return 301 https://domain.com$request_uri;
}

All of them have no effect. I'm running out of trial to match my error.
Can anyone tell me what I'm doing wrong? Thank you.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Help with specific redirect to https

Pete Ashdown December 12, 2012 11:14AM

Re: Help with specific redirect to https

Antonio P.P. Almeida December 12, 2012 11:50AM

Re: Help with specific redirect to https

Pete Ashdown December 12, 2012 12:00PM

Re: Help with specific redirect to https

Antonio P.P. Almeida December 12, 2012 01:08PM

Re: Help with specific redirect to https

Pete Ashdown December 12, 2012 02:24PM

Re: Help with specific redirect to https

António P. P. Almeida December 12, 2012 05:32PM

Re: Help with specific redirect to https

Pete Ashdown December 13, 2012 12:06PM

Re: Help with specific redirect to https

Francis Daly December 12, 2012 06:44PM

Re: Help with specific redirect to https

Francis Daly December 12, 2012 12:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 275
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