title: Redirect http to https IIS7
body: <p>I'm trying to force any users using the calling my website through </p>
  
  <blockquote>
    <p><a href="http://www.mysite.com" rel="nofollow">http://www.mysite.com</a></p>
  </blockquote>
  
  <p>to route through </p>
  
  <blockquote>
    <p><a href="https://www.mysite.com" rel="nofollow">https://www.mysite.com</a></p>
  </blockquote>
  
  <p>automatically. </p>
  
  <p>I've added the following markup to my web.config:</p>
  
  <pre><code>&lt;rewrite&gt;
        &lt;rules&gt;
           http:// to https:// rule 
          &lt;rule name="ForceHttpsBilling" stopProcessing="true"&gt;
            &lt;match url="(.*)billing/(.*)" ignoreCase="true" /&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>I'm getting an message on the type="redirect" line saying:</p>
  
  <blockquote>
    <p>Module qualification required</p>
  </blockquote>
  
  <p>I'm guessing this means that I need to reference an assembly, or the "rewrite" node needs to be under another parent node, but can't figure it out / get an answer from Google.</p>
  
  <p>The project is ASP.Net and is being hosted in IIS7 using .Net 4.0</p>