Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Works fine with Rewrite goes into loop when changed to Redirect

$
0
0

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


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>