Help with specific redirect to https

Pete Ashdown pashdown at xmission.com
Thu Dec 13 17:03:49 UTC 2012


On 12/12/2012 03:30 PM, António P. P. Almeida wrote:
> 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;
> }
>

Thank you Antonio.  This works perfectly.



More information about the nginx mailing list