title: Azure Cloud Service redirect http to https not working (tried answers on many links)
body: <p>I'm trying to do the 'simple' task of redirecting/rewriting traffic from http to https, I have one endpoint in a CloudService which is correctly configured for SSL.</p>
  
  <p>I've tried many IIS rewrite rules, like the one below, but none are working.  I've also tried setting up the rules via remote desktop on the IIS 8 server directly which also doesn't work.</p>
  
  <p>When I enter any  tag in the Azure web.config file the rewrite tag has a blue line under it with a message saying it is invalid under <code>&lt;system.webServer&gt;</code> :</p>
  
  <pre><code>&lt;system.webServer&gt;
  ...
        &lt;rewrite&gt;
            &lt;rules&gt;
                &lt;rule name="RedirectToHTTPS" 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" url="https://{SERVER_NAME}/{R:1}" redirectType="SeeOther" /&gt;
                &lt;/rule&gt;
            &lt;/rules&gt;
        &lt;/rewrite&gt;
  
    &lt;/system.webServer&gt;
  </code></pre>
  
  <p>Any advice is much appreciated.</p>