I want to create a rule to redirect query to a page (which doesn’t exist) to another
Example:
http://www.example.com/en/page.asp?id=2&...
to
http://www.example.com/en-US/newpage.asp?id=2&...
I use this rule:
<rule name="Redirect" stopProcessing="true">
<match url="page\.asp\?(.+)$" />
<action type="Rewrite" url="newpage.asp?{R:1}" />
</rule>
But this doesn’t work… I got a 404 error…
What is my mistake?
Thanks
gets displayed on the browser but it expects the original page to
exist on the server. For your case, you need a Redirect action.
Try this code instead:
The permanent redirect helps makes your website SEO (Search Engine Optimized) preventing search engine bots to index the old URL (and hence not splitting page ranks between the 2 URLs).