I would like to redirect testdomain.com/diamonds/silver to testdomain.com/diamonds.
I need to have the domain specified because the website has several domains attached to it.
This is what i have now, but it does not seem to do anything.
<rule name="testredirect" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^testdomain.com/diamonds/silver" />
</conditions>
<action type="Redirect" url="/diamonds" redirectType="Permanent" />
</rule>
I have also tried this, but that did not work either.
<rule name="testredirect" stopProcessing="true">
<match url="^testdomain.com/diamonds/silver" ignoreCase="true" />
<action type="Redirect" url="/diamonds" redirectType="Permanent"/>
</rule>
Any suggestions?
I have figured it out. Answer below!