title: URL Rewrite on IIS always fail when change the pattern
body: <p>I'm trying to work in a rewrite problem, but its my first time and I guess I'm doing something very wrong.</p>
  
  <p>A few users of our portal, try to navigate typing <a href="https://www.dudalina.proveagora.com" rel="nofollow noreferrer">https://www.dudalina.proveagora.com</a> instead the right one <a href="https://dudalina.proveagora.com" rel="nofollow noreferrer">https://dudalina.proveagora.com</a>. We have the SSL only for *.proveagora.com, so I started to try a redirect on the users who type the wrong url.
  Here, the print of rewrite working great:
  <img src="https://i.stack.imgur.com/4fwS6.png" alt="enter image description here"></p>
  
  <p>but, some users type https:// and some users type http://. By this way, I've tried to change the pattern.</p>
  
  <p><img src="https://i.stack.imgur.com/mOkrO.png" alt="enter image description here"></p>
  
  <p>I dont know why, but using the second pattern, the url <a href="https://www.dudalina.proveagora.com" rel="nofollow noreferrer">https://www.dudalina.proveagora.com</a> doesnt redirect anymore. </p>
  
  <p>Just to explain a little more, the dudalina part is dynamic too. Dudalina is the store name, and it will change accordingly with store. So, we can have latter something like <a href="http://bestbuy.proveagora.com" rel="nofollow noreferrer">http://bestbuy.proveagora.com</a> or anything else and this patterns much works with all the options.</p>
  
  <p>I know, the user cant type www.bestbuy.proveagora.com but they do, and we need to make it works! :(</p>
  
  <p>Any help?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>xml Web.Config</p>
  
  <pre><code>     &lt;rewrite&gt;
          &lt;rules&gt;
              &lt;rule name="RemoveWWWPrefix" stopProcessing="true"&gt;
                  &lt;match url="(.*)" negate="false" /&gt;
                  &lt;conditions logicalGrouping="MatchAll" trackAllCaptures="true"&gt;
                      &lt;add input="{HTTP_HOST}" pattern="^(https\:\/\/|https\:\/\/)?([a-zA-Z]+\.)?(proveagora\.com){1}(\/.*)?$" ignoreCase="false" negate="true" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="Redirect" url="http://dudalina.proveagora.com" appendQueryString="false" /&gt;
              &lt;/rule&gt;
          &lt;/rules&gt;
      &lt;/rewrite&gt;
  </code></pre>