title: Use IIS7 URL Rewriting to redirect all requests
body: <p>I have a .NET site that I am taking down and I plan on redirecting all requests to <code>www.mysite.com</code> using a rewrite rule in the <code>web.config</code>. Should be a simple task, but it's not. I've removed all the content from the filesystem except a single <code>Default.aspx</code> page and a default <code>web.config</code> with the following rewrite rule:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;rule name=&quot;Redirect All&quot; stopProcessing=&quot;true&quot;&gt;
    &lt;match url=&quot;^(www\.)?mysite\.com(/.+)$&quot; /&gt;
    &lt;action type=&quot;Redirect&quot; url=&quot;www.mysite.com&quot; appendQueryString=&quot;false&quot; /&gt;
  &lt;/rule&gt;
  </code></pre>
  <p>If I request <code>www.mysite.com/garbage.aspx</code> the server is still trying to look up <code>garbage.aspx</code>, or any other url I provide just as if the rewrite rule was not there.
  Very frustrating. Ideas?</p>