title: asp.net mvc 2.0 : route request to static resource
body: <p>I want to route HTTP requests not to an action, but to a file.</p>
  
  <p><strong>Important:</strong> I <strong>do have</strong> a working solution using IIS 7.0 URL Rewriting module, but for debugging at home (no IIS 7.0) I can't use URL rewriting.</p>
  
  <p><strong>Specific situation</strong><br>
  I want to point any URL that contains <code>/images/</code> to a <code>~/images/</code> folder.</p>
  
  <p>Example:</p>
  
  <pre><code>http://wowreforge.com/images/a.png -&gt; /images/a.png
  http://wowreforge.com/Emerald Dream/Jizi/images/a.png -&gt; /images/a.png
  http://wowreforge.com/US/Emerald Dream/Jizi/images/a.png -&gt; /images/a.png
  http://wowreforge.com/characters/view/images/a.png -&gt; /images/a.png
  </code></pre>
  
  <p>The problem stems from the fact that page "view_character.aspx" can be arrived to from multiple URLs:  </p>
  
  <pre><code>http://wowreforge.com/?name=jizi&amp;reaml=Emerald Dream
  http://wowreforge.com/US/Emerald Dream/Jizi
  </code></pre>
  
  <p><strong>Context</strong>
  IIS 7.0 (integrated mode), ASP.NET MVC <strong>2.0</strong></p>
  
  <p><strong>Extra Credit Questions</strong>  </p>
  
  <ul>
  <li>Is it a bad idea to use ASP.NET MVC routing in this situation instead of URL rewriting?</li>
  <li>What handler does IIS 7.0 routes requests to physical files?</li>
  </ul>