title: Adding Rewrite rule to web.config causes error in IIS console
body: <p>Hi I have added a http to https redirect to my web.config</p>
  
  <pre><code>&lt;rewrite&gt;
        &lt;rules&gt;
          &lt;rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true"&gt;
          &lt;match url="(.*)" /&gt;
          &lt;conditions logicalGrouping="MatchAny"&gt;
            &lt;add input="{HTTPS}" pattern="off" ignoreCase="true" /&gt;
          &lt;/conditions&gt;
          &lt;action type="Redirect" url="https://{HTTP_HOST}/" redirectType="Found" /&gt;
          &lt;/rule&gt;
        &lt;/rules&gt;
      &lt;/rewrite&gt;
  </code></pre>
  
  <p>It is within the  as required, in fact it is exactly the same as another iis I have running on another box. </p>
  
  <p>However on this server when I save the config and then check the IIS control panel I get an</p>
  
  <p>"There was an error while performing this operation ... Details: Filename \?D:\site\web.config Error: </p>
  
  <p>and there is no error.  When I remove the rewrite from the config everything is fine.</p>
  
  <p>The only difference between this server setup and the one that works is that the broken server website is not in the root or is it the default website.</p>
  
  <p>Has anyone encountered this type of error before?</p>
  
  <p>Thanks
  Jon</p>