title: How to route ALL requests for domain to a sub folder asp.net
body: <p>I have seen lots of solutions to this but none seem to work....</p>
  
  <p>I have a domain</p>
  
  <pre><code>producerpte.co.uk
  </code></pre>
  
  <p>But I have a separate application set up in a sub folder so to see the root of that application you have to go to...</p>
  
  <pre><code>producerpte.co.uk/producerpte
  </code></pre>
  
  <p>However I want it so that the user does not see the 'site1' part of the url.</p>
  
  <p>When I use url rewriting in <code>Web.Server</code> config or I use <code>Context.RewritePath</code> in code (in an application set up on the root) it simply redirects the user to the url (with site1 in it) I do not want the user to know they are going to a subfolder.</p>
  
  <p>Am I setting this up wrong?</p>
  
  <p>I'm actually using Winhost. All the examples ive tried just do not change result of the call without redirecting the url :-(</p>
  
  <p>I have been told by winhost that I should do it with code/configuration. I would prefer to do it with code to be honest....</p>
  
  <p>UPDATE : I tried Max's answer and I did...</p>
  
  <pre><code> &lt;rules&gt;
      &lt;rule name="Redirect if producerpte" stopProcessing="true"&gt;
          &lt;match url="^ producerpte/(.*)$" /&gt;
          &lt;action type="Redirect" url="{R:1}" /&gt;
      &lt;/rule&gt;
      &lt;rule name="Rewrite to sub folder"&gt;
          &lt;match url="^.*$" /&gt;
          &lt;action type="Rewrite" url="producerpte/{R:0}" /&gt;
      &lt;/rule&gt;
    &lt;/rules&gt;
  </code></pre>
  
  <p>But no luck :-( And the urls still change in the browser....</p>