URL Rewrite city.domain.com to domain.com/city
Posted by: Scott Forsyths WebLog,
on 23 Nov 2011 |
View original | Bookmarked: 0 time(s)
An IIS 7.x URL Rewrite question that comes up often is how to redirect something.domain.com to domain.com/city. Heres an example URL Rewrite rule to accomplish that: <rule name="CName to URL" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(?!www)(.*)\.domain\.com$" />
</conditions>
<action type="Redirect"...