title: IIS UrlRewrite for subdomain to subdirectory
body: <p>I'm trying to simply do a subdomain rewrite to a directory.  Example, http*://member.mydomain.com would redirect to http*://mydomain.com/memberarea/.  I don't want ALL subdomains to do this, just the defined "member" one.</p>
  
  <p>Here is the code I have, and it does not work.  I'm obviously missing something...</p>
  
  <pre><code>&lt;rule name="Member Pages" stopProcessing="true"&gt;
      &lt;match url="^(.+)" /&gt;
      &lt;conditions&gt;
          &lt;add input="{HTTP_HOST}" pattern="(.*)://member\.example\.com($)" /&gt;
      &lt;/conditions&gt;
      &lt;action type="Redirect" url="{C:1}://example.com/MemberArea/{R:1}" /&gt;
  &lt;/rule&gt; 
  </code></pre>
  
  <p>My hope is this would also make <a href="http://member.example.com/Report/SomeReport.aspx" rel="nofollow noreferrer">http://member.example.com/Report/SomeReport.aspx</a> resolve to <a href="http://example.com/MemberArea/Report/SomeReport.aspx" rel="nofollow noreferrer">http://example.com/MemberArea/Report/SomeReport.aspx</a>.</p>
  
  <p>Any help would be greatly appreciated.</p>