title: URL rewrite web.config with location https
body: <p>I want to redirect my extranet site to <strong>https</strong> I have the following <strong>web.config</strong> rule:</p>
  
  <pre><code> &lt;location path="." inheritInChildApplications="false"&gt;
    &lt;system.webServer&gt;
      &lt;rewrite&gt;
        &lt;rules&gt;
  
        &lt;rule name="Redirect to https" stopProcessing="true"&gt;
         &lt;match url="(.*)" /&gt;
          &lt;conditions&gt;
           &lt;add input="{HTTPS}" pattern="off" `enter code here`ignoreCase="true" /&gt;
          &lt;/conditions&gt;
         &lt;action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" 
                    redirectType="Permanent" appendQueryString="false" /&gt;
        &lt;/rule&gt;
       &lt;/rules&gt;
     &lt;/rewrite&gt;
    &lt;/system.webServer&gt;
  &lt;/location&gt;
  </code></pre>
  
  <p>The problem comes because I have several services hosted on my server  that are children, and I don't want them to redirect too, I just want to redirect the site not the services. </p>