I'm trying to set a canonical default URL in IIS 7 using the URL Rewrite module. I think that I'm misunderstanding how the 'Match URL' field is used. The following doesn't seem to do anything:
<rewrite>
<rules>
<rule name="EnforceDefaultPage">
<match url="^http://(?:www\.)?mydomain\.com(?:/)?(?:blog\.aspx)?$" />
<action type="Redirect" url="http://www.mydomain.com/blog" appendQueryString="false" />
</rule>
</rules>
</rewrite>
I've noticed in a lot of examples that people have added a condition utilizing the HTTP_HOST variable... but how does this relate to the match url? It seems that I should be able to omit any conditions because my regex matches exactly what I want.