I have a website running on IIS 7 bound to port 80 with 2 domains (for our purposes - example.com & test.com) pointed at it.
example.com is our canonical name so I would like any client that hits test.com to be redirected to example.com.
I have been trying to use the IIS 7 Rewrite module. However it doesn't seem to have any effect whatsoever. How can I trouble shoot this?
Here's the rule I put in my web.config.
<rewrite>
<rules>
<rule name="rule1" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
<match url="*test.com*" />
<action type="Redirect" url="{R:1}example.com{R:2}" />
</rule>
</rules>
</rewrite>