Reputation: 1794
This rule doesn't add the querystring to the output and I can't work out why:-
<rule name="Show Week" stopProcessing="true">
<match url="^show-week.aspx(.*)" />
<action type="Redirect" url="showresort.aspx{R:1}" redirectType="Permanent" appendQueryString="true" />
</rule>
The input URL is www.mysite.com/show-week.aspx?siteId=EUR&resortId=672&resortType=1&avail=0
The outupt URL should be www.mysite.com/showresort.aspx?siteId=EUR&resortId=672&resortType=1&avail=0
But what I get is just www.mysite.com/showresort.aspx
Upvotes: 1
Views: 1033
Reputation: 1071
You can use trackAllCaptures to capture querystring and then append it to new URL.
<rule name="Show Week" stopProcessing="true">
<match url="^show-week.aspx(.*)" />
<conditions trackAllCaptures="true">
<add input="{QUERY_STRING}" pattern="(.*)" />
</conditions>
<action type="Redirect" url="showresort.aspx?{C:1}" redirectType="Permanent" appendQueryString="false"/>
</rule>
Upvotes: 1