title: using URL Rewriting
body: <p>I am hosting 2 domain sites under one hosting server</p>
  
  <pre><code>\
  
   -Site1
  
   -Site2
  </code></pre>
  
  <p>I have 2 domains pointing to the hosting server.</p>
  
  <p>e.g.</p>
  
  <p><code>site1.com</code> should point to <code>site1</code> folder
  <code>site2.com</code> should point to <code>site2</code> folder.</p>
  
  <p>currently at the root I have default file that would check if Request.ServerVariables("ServerName") is site1.com then redirect to (/site1)</p>
  
  <p>so it shows <code>site1.com/site1/</code> and <code>site2.com/site2/</code></p>
  
  <p>How do I remove the subfolder? so it shows <code>site1.com</code> and <code>site2.com</code>?</p>
  
  <p>I have looked into Using URL Rewriting,but I cant put the code together..... I believe each sub folder should have a <code>global.asax</code> file and in the  <code>Application_BeginRequest</code> I think I should do something.</p>