We’ve moved our site from a php apache site to an asp.net mvc site and I’m trying to get specific redirects to work but am getting stuck.
Basically I want any request for http://www.mysite.com/index.php?pr=about_us to be redirected to http://www.mysite.com/About-Us
I’ve tried this but it doesn’t work. Any ideas?
<rewrite>
<rules>
<rule name="About Us" stopProcessing="true">
<match url="index.php?pr=About_Us" ignoreCase="false" />
<action type="Redirect" redirectType="Permanent" url="http://www.mysite.com/About-Us" />
</rule>
</rules>
</rewrite>
I’ve also tried this but it didn’t work either.
<httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Permanent">
<add wildcard="index.php?pr=About_Us" destination="/About-Us" />
</httpRedirect>
I’ve got about a dozen of these specific redirects that I need to implement to various pages.
Any help is greatly appreciated!
Thanks
Try this one:
Edit
This is another possibility for the conditions:
Edit – Working Solution