Question

I am totally new to IIS servers and need to implement some rewrites. The following rule in my RewriteMaps file causes a 500 error:

<add key="/contenttemplates/news.aspx?id=8589976277&LangType=3081&CurrencyType=156" value="/" />

While this one works fine:

<add key="/offset-air.php" value="/" />

I can only assume the query string has something to do with the issue, but I struggle to find a reason as to why this URL would be an issue. Initial google attempts have come up empty.

I would be very grateful if someone could point me in the right direction.

Many Regards!

Was it helpful?

Solution

If your rewrite maps are causing you issues, you should consider encoding your urls correctly.

An & in the URL (in either the key or the value) should be replaced with an &amp;.

 <add key="/contenttemplates/news.aspx?id=8589976277&LangType=3081&CurrencyType=156" value="/" />

would then become:

 <add key="/contenttemplates/news.aspx?id=8589976277&amp;LangType=3081&amp;CurrencyType=156" value="/" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top