New and getting my feet wet with URL rewrite. I have the following rule that works fine with "Rewrite", but as the IIS log file indicates, it seems to go into an endless loop when changed to "Redirect". I am trying to strip all arguments except "cat" from the "QUERY_STRING".
ie:
Category/main.taf?cat=1&pc=1&gpc=1&crumb=1
to
Category/main.taf?cat=1
<rule name="Category Rewrite" stopProcessing="true">
<match url="^Category/main.taf(.*)" negate="false" />
<action type="Redirect" url="category/main.taf?cat={C:1}" appendQueryString="false" redirectType="Temporary" />
<conditions>
<add input="{HTTP_HOST}" pattern="www.mywebsite.com" />
<add input="{QUERY_STRING}" pattern="cat=([0-9]+)(.*)" />
</conditions>
</rule>
Thanks,
Steve