Help with specific redirect to https

Pete Ashdown pashdown at xmission.com
Wed Dec 12 16:13:27 UTC 2012


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121212/ff64e345/attachment.html>


More information about the nginx mailing list