I want to redirect a SEO-Friendly outgoing link like example.com/out/productxyz with IIS 8.5. So I created a Rewrite-Rule with the Action-Type forward. The target URL has Parameters, e.g. example.com/action.aspx?param1=value¶m2=value
The Problem is: When the IIS is saving the rule, the '&' chars from the parameters are converted to their HTML-Values:
<action type="Redirect" url="http://example.com/action.aspx?param1=value&amp;param2=value" redirectType="Found" />
So a '&' is converted to '&'. I took a look in the header and the IIS is exactly redirecting to 'http://example.com/action.aspx?param1=value&param2=value'. This breaks because of the '&' and so I get another side, and not the one which I would get with correct parameters.
I already tried to replace all '&' to '&' in the web.config, but then I got an error in IIS that the config isn't a well-formed xml. So my question: How can I redirect a custom URL to a target URL with URL-Parameters, without broke the parameters?
the value in
web.config
should look likenot (notice the extra
amp;
you have here)