title: resolving urls to some other url for development purposes
body: <p>I am working with both asp and asp.net pages together. I wanted to host the application in my local iis (v5.1) but later learned about iisexpress suits my needs. But irrespective of whether I use iis 5.1 or iis express I seem to have an issue.</p>
  
  <p>The asp page which I work with refers to static resources (css, javascript, etc) which reside in a different virtual directory. For e.g. a css file include would look like this.</p>
  
  <pre><code>&lt;link rel="stylesheet" href="/common/include/style/css.css"/&gt;
  </code></pre>
  
  <p>If such a thing is supposed to run from the test environment then the above url would resolve to:</p>
  
  <pre><code>http://testing/common/include/style/css.css
  </code></pre>
  
  <p>This is in contrast where my main application would reside. That would look something like:</p>
  
  <pre><code>http://testing/myapp/default.aspx
  </code></pre>
  
  <p>Now if I run iisexpress in say port 8082, and there is an inbound request like:</p>
  
  <pre><code>http://localhost:8082/common/inlcude/style/css.css
  </code></pre>
  
  <p>it will hit a 404 error. Is it possible to instruct iss or iis express to resolve such url (which begin with <code>/common/...</code>) to say <code>http://testing/common/...</code></p>
  
  <h2>Update (May 31st 2011, 7.04 PM IST):</h2>
  
  <p>Been doing some research on what url rewriting is, and from the examples I have come to understand a few things. I am not sure if what I want is url re-writing, per se. Again taking the iisexpress analogy, I know there will be an inbound request uri like:</p>
  
  <pre><code>http://localhost:8082/common/inlcude/style/css.css
  </code></pre>
  
  <p>But I want this to be actually served by the following uri:</p>
  
  <pre><code>http://testing/common/include/style/css.css
  </code></pre>
  
  <p>The former uri doesn't exist in the folder which I have virtualized using iisexpress.</p>
  
  <p>Do I need url re-writing here?</p>
  
  <p>Further, in ASP, I have include lines like:</p>
  
  <pre><code>&lt;!-- #include virtual="/common/include/classes/utils.asp" --&gt;
  </code></pre>
  
  <p>Even these things are supposed to be resolved to their corresponding <code>http://testing/...</code> counterparts. </p>
  
  <p>ps: I am doing all this is iis 5.1</p>