I'm trying to do a 301 redirect using the IIS URL rewrite module. I've googled, looked at videos and put in different settings but it does nothing...meaning, the link I set up the redirect on still just works as before. I don't even get an error.
Here are my settings:
I've also tried using a Redirect URL that was within the same domain as the link I'm trying to redirect...again, nothing happens, the link still just works as before and no errors either.
Any help is so much appreciated.
Query string is not included in Match URL and? have different meaning in regex expression.
Please use {REUEST_URI} and \\? instead.
<rule name="rewrite rule" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{REQUEST_URI}" pattern="/Turf/ProductView.cfm\?P=151" />
</conditions>
<action type="Redirect" url="https://www.weathermatic.com/products/6000-pro-rotors/{R:0}" />
It will redirect Turf/ProductView.cfm?P=15 to https://www.weathermatic.com/products/6000-pro-rotors/Turf/ProductView.cfm?P=151
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.