title: URL Rewrite on IIS from http to https is not working,
body: <p>I have a problem. On <code>IIS</code> I got a web-site with two ports <code>80</code> and <code>443(https)</code>. I want to redirect all the <code>http</code> requests from user to <code>https</code>. I also added <code>Rewrite rule to https</code>, but when I enter in browser <code>http://localhost/site</code> it gives me the same page. I need to redirect user to <code>httpS://localhost/site</code>.</p>
  
  <p>Maybe this is because of my local configurations? </p>
  
  <p>And I disable <code>Require SSL</code> on <code>IIS</code>.</p>
  
  <pre><code>The rule is:
  &lt;rewrite&gt;
    &lt;rules&gt;
      &lt;rule name="HTTPS Redirect"&gt;
        &lt;match url="(.*)" ignoreCase="false" /&gt;
        &lt;conditions&gt;
          &lt;add input="{HTTPS}" pattern="off" ignoreCase="false" /&gt;
        &lt;/conditions&gt;
        &lt;action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}{REQUEST_URI}" /&gt;
      &lt;/rule&gt;
    &lt;/rules&gt;
  &lt;/rewrite&gt;
  </code></pre>
  
  <p>Thank you.</p>