title: Force Umbraco to use https for back office and http for all other requests
body: <p>I am trying to configure Umbraco so all requests to the back office (www.mydomain.com/umbraco) get redirected to https and all non-backoffice requests are forwarded to http.</p>
  
  <p>I can easily get the back office to use SSL by setting this web config appsetting key:</p>
  
  <pre><code>&lt;add key="umbracoUseSSL" value="false" /&gt;
  </code></pre>
  
  <p>However, I am struggling to get all other pages to force http. The certificate is self signed so I don't want end users getting SSL errors. I have tried this rewrite rule in the web.config, but it has no impact.</p>
  
  <pre><code>&lt;rule name="No-https" enabled="true" stopProcessing="true"&gt;
     &lt;match url=".*" negate="false" /&gt;
     &lt;conditions&gt;
        &lt;add input="{HTTPS}" pattern="on" /&gt;
        &lt;add input="{URL}" pattern="umbraco" negate="true" /&gt;
     &lt;/conditions&gt;
     &lt;action type="Redirect" url="http://{HTTP_HOST}{REQUEST_URI}" /&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>My aim is that any request to <strong>https</strong>://www.mydomain.com is redirected to <strong>http</strong>://www.mydomain.com unless it matches the folder /umbraco.</p>
  
  <p>If I have this rule, all http requests are redirected to https:</p>
  
  <pre><code>&lt;rule name="Redirect to HTTPS" stopProcessing="true"&gt;  
     &lt;match url="(.*)" /&gt;  
     &lt;conditions&gt;  
        &lt;add input="{HTTPS}" pattern="^OFF$" /&gt;  
     &lt;/conditions&gt;  
     &lt;action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" /&gt;  
  &lt;/rule&gt;
  </code></pre>
  
  <p>But when I negate the rule, it no longer has any effect?</p>
  
  <pre><code>&lt;rule name="Redirect to HTTP" stopProcessing="true"&gt;  
     &lt;match url="(.*)" /&gt;  
     &lt;conditions&gt;  
        &lt;add input="{HTTPS}" pattern="^OFF$" negate="true" /&gt;  
     &lt;/conditions&gt;  
     &lt;action type="Redirect" url="http://{HTTP_HOST}/{R:1}" redirectType="Permanent" /&gt;  
  &lt;/rule&gt;
  </code></pre>
  
  <hr>
  
  <p>Update. It looks like it isn't possible to process the redirect because the browser is giving the https error before the rewrite rule runs? <a href="https://stackoverflow.com/questions/23521496/redirect-from-https-to-http-when-the-ssl-cert-is-no-longer-valid">Redirect from https to http when the SSL cert is no longer valid</a>. Is there any way to redirect to http when using a self signed certificate?</p>