Help with specific redirect to https
António P. P. Almeida
appa at perusio.net
Wed Dec 12 22:30:15 UTC 2012
On 12 Dez 2012 20h22 CET, pashdown at xmission.com wrote:
> On 12/12/2012 11:07 AM, Antonio P.P. Almeida wrote:
>>> Thanks for your attempt, but this failed as well.
>>
>> What's the exact structure of your URI?
>>
>> If it's an argument then there are several approaches. For starters
>> this should work (but it's ugly :) to improve it we need further
>> details).
>>
>> map $request_uri $redirect_https {
>> default 0;
>> ~*^.*UserLogin.*$ 1;
>> }
>
> 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
Try:
map $arg_title $redirect_https {
default 0;
Special:UserLogin 1;
}
--- appa
More information about the nginx
mailing list