I’ve wanted to use subdomains for sub-sites within a single application for a while now. Basically, instead of setting up multiple sub-sites like this…
http://example.com/shop1.aspx?name=john/
…I wanted this…
I want dynamic subdomain virtually using URL rewrite I have no idea how to do this.
-----------UPDATE------
After searching over the internet I got following code.it redirect perfect but not rewriting the URL
my page is- http://domain/mySpace.aspx?una=sunil
<rule name="Redirect to Subdomains" stopProcessing="true">
<match url="^mySpace.aspx$" />
<conditions>
<add input="{QUERY_STRING}" pattern="^una=(.+)$" />
</conditions>
<action type="Rewrite" url="http://{C:1}.{HTTP_HOST}"
appendQueryString="false" />
</rule>
But still not able to resolve it.