title: ASP.NET httpRedirect : redirect all pages except one
body: <p>I use this code in the web.config in one of the folders of my website to redirect all pages to the root because I want to close permanently this section.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
   &lt;location&gt;
      &lt;system.webServer&gt;
        &lt;httpRedirect enabled="true" destination="http://www.example.com/" httpResponseStatus="Permanent" /&gt;
      &lt;/system.webServer&gt;
    &lt;/location&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>But I need to make an exception to this rule : I don't want my page "default.aspx" to be redirect. How can I do that?</p>