Sourabh Dhiman

Sourabh Dhiman

  • NA
  • 323
  • 58.3k

Url rewrite with ASP.NET query string

Jul 26 2019 1:35 AM
<rule name="Redirect" stopProcessing="true">
<match url="(.*)" />
<conditions trackAllCaptures="true">
<add input="{QUERY_STRING}" pattern="&amp;?(beta=[^&amp;]+)&amp;?" />
<add input="{QUERY_STRING}" pattern="&amp;?(gamma=[^&amp;]+)&amp;?" />
<add input="{REQUEST_URI}" pattern="^/redirect" negate="true" />
</conditions>
<action type="Redirect" url="/redirect?{C:1}&amp;{C:2}" appendQueryString="false" redirectType="Found" />
</rule>
 
Please check this code .
 
I will try this code local host .
 
my url -http://localhost:56966/reservations/reservation.aspx -- 

Answers (1)