title: Using URL Rewrites to allow 1 IP address to host two subdomains
body: <p>I have a scenario where I need to two different subdomains to come through the firewall and be rewritten or redirected to areas on the server.  For example if I have sub1.mydomain.com/testsub1.html  entered externally, I want it to hit the IIS "Default web site/folders/sub1/testsub1.html" and likewise, if  sub2.mydomain.com/testsub2.html is received I want it to go to "Default web site/folders/sub2/testsub2.html".  We were told that URL Rewritew would be the way to go on this.  So we set up rules in the Default web site, to use the MatchURL pattern for:
  1. sub1.mydomain.com(.<em>) and to rewrite it to "Default web site/folders/sub1(R:1)" with the action type of Rewrite. 
  2. sub2.mydomain.com(.</em>) and to rewrite it to "Default web site/folders/sub2(R:1)" with the action type of Rewrite. </p>
  
  <p>If I hit <a href="http://sub1.mydomain.com/testsub1.html" rel="nofollow">http://sub1.mydomain.com/testsub1.html</a>, I get a file not found error.  What I am seeing in the logs is the GET /testsub1.html.  If I change the URL to <a href="http://sub1.mydomain.com/folders/sub1/testsub1.html" rel="nofollow">http://sub1.mydomain.com/folders/sub1/testsub1.html</a>, it works perfectly and I see GET /folders/sub1/testsub1.html in the logs and the proper page is displayed in the browser.  </p>
  
  <p>What am I missing to make this work without the full path?</p>