<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font size="-1"><font face="Helvetica, Arial, sans-serif">I'm trying
        to redirect any<font size="-1"> URL that contains "UserLogin"
          (ie: Mediawiki) to https<font size="-1">.  This is what I've
            tried:<br>
            <font size="-1"><br>
              rewrite .*UserLogin.* <a class="moz-txt-link-freetext" href="https://domain.com$request_uri">https://domain.com$request_uri</a>?
              permanent;<br>
              <font size="-1">----<br>
                <font size="-1">rewrite UserLogin <a class="moz-txt-link-freetext" href="https://domain.com">https://domain.com</a><font
                    size="-1">$request_uri? permanent;<br>
                    <font size="-1"><font size="-1">----<br>
                        <font size="-1">rewrite ^.*UserLogin.*$ </font></font></font></font></font></font></font></font></font></font></font><font
      size="-1"><font face="Helvetica, Arial, sans-serif"><font
          size="-1"><font size="-1"><font size="-1"><font size="-1"><font
                  size="-1"><font size="-1"><font size="-1"><font
                        size="-1"><font size="-1"><font size="-1"><font
                              face="Helvetica, Arial, sans-serif"><font
                                size="-1"><font size="-1"><font
                                    size="-1"><font size="-1"><font
                                        size="-1"><a class="moz-txt-link-freetext" href="https://domain.com">https://domain.com</a><font
                                          size="-1">$request_uri?
                                          permanent;<br>
                                          <font size="-1">----</font></font></font></font></font></font></font></font></font></font></font></font></font></font></font><br>
                location ~* .*UserLogin.* {<br>
                  return 301 <a class="moz-txt-link-freetext" href="https://domain.com$request_uri">https://domain.com$request_uri</a>;<br>
                }<br>
              ----</font></font></font></font></font><font size="-1"><font
        face="Helvetica, Arial, sans-serif"><font size="-1"><font
            size="-1"><font size="-1"><br>
                location ~ .*UserLogin.* {<br>
                  return 301 <a class="moz-txt-link-freetext" href="https://domain.com$request_uri">https://domain.com$request_uri</a>;<br>
                }<br>
              <br>
              <font size="-1">All of them have no effect.  <font
                  size="-1">I'm running out of trial to match my error. 
                  Can anyone tell me what I'm doing wrong?<font
                    size="-1">  Thank you.<br>
                    <br>
                  </font></font></font></font></font></font></font></font>
  </body>
</html>