: 301 redirecting urls with special characters using web.config I am trying to redirect some old urls containing some special characters. When I place the url on the web.config automatically it
I am trying to redirect some old urls containing some special characters. When I place the url on the web.config automatically it gives me a 500 internal server error.
So, how do I translate the special character "&" to get it working.
More posts by @Hamm4606531
1 Comments
Sorted by latest first Latest Oldest Best
The HTTP status code 500 "internal server error" is shown because the URL's you used are not properly escaped.
A quote from StackOverflow:
When adding a query string in the action of a rewrite rule, you've got to escape all the "?" and "&" characters in the URL.
? = ?
& = &
For example the following won't work:
<action type="Redirect" url="/long_url.aspx?key1=value1&key2=value2" />
For example the following will work:
<action type="Redirect" url="/long_url.aspx?key1=value1&key2=value2" />
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.