title: Forward http to https in Azure
body: <p>We have a deployment on Azure with a Web Role that uses https.  Since this is the only way we would like our users to access the system, we want to forward users that visit the http version to the https version.</p>
  
  <p>We have tried the recommendations <a href="http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/de6a67ae-6679-41d2-af4e-9ac264a404d0/">here</a>. </p>
  
  <p>Namely, we added the following to our web.config:</p>
  
  <pre><code>&lt;system.webServer&gt;
  &lt;rewrite&gt;
    &lt;rules&gt;
      &lt;rule name="HTTP to HTTPS redirect" stopProcessing="true"&gt;
        &lt;match url="(.*)" /&gt;
        &lt;conditions&gt;
          &lt;add input="{HTTPS}" pattern="off" ignoreCase="true" /&gt;
        &lt;/conditions&gt;
        &lt;action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" /&gt;
      &lt;/rule&gt;
    &lt;/rules&gt;
  &lt;/rewrite&gt;
  </code></pre>
  
  <p></p>
  
  <p>However, this doesn't seem to work.  Does anybody have any idea how to accomplish this?  It seems like it would be a common request...</p>