Hello,
I have written the following rule but with unexpected results. I want the rule to do the following:
A user registers with our website and is given the follwing URL to view his profile:
http://username.mywebsite.com
when he types in the URL the rule is suppose to rewrite the url and take him to:
http://www.mywebsite.com/users/username
Mind you, no subdomains are ever created only a folder under users is created upon registration.
Here is my rule:
<rule name="MyURLRewriteRule" stopProcessing="false">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(?!www)(\w+)\.mywebsite\.com$" />
</conditions>
<action type="Rewrite" url="{C:1}/{R:1}" />
</rule>
Please help!!
Thanks in advance.