Welcome! Log In Create A New Profile

Advanced

Re: Help with specific redirect to https

Francis Daly
December 12, 2012 06:44PM
On Wed, Dec 12, 2012 at 12:22:51PM -0700, Pete Ashdown wrote:

Hi there,

> This is what it looks like via Mediawiki. The &returnto argument is
> dependent on where the Login button is hit, and may or may not be present.
>
> http://domain.com/index.php?title=Special:UserLogin&returnto=Main+Page

In nginx terms, for this request, $uri = /index.php. $uri is what both
"rewrite" and "location" match against. That is why the first few attempts
did not do what you hoped they would.

Some other variables which are available include:

$request_uri = /index.php?title=Special:UserLogin&returnto=Main+Page
$args = title=Special:UserLogin&returnto=Main+Page
$arg_title = Special:UserLogin

So you can do an exact or regex match of any of those in a "map" to set
another variable; or you can match directly in an "if"; and then return
the redirection.

All the best,

f
--
Francis Daly francis@daoine.org

_______________________________________________
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: 300
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