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.

  • Can you mark the question as answered?
    – Bob Ortiz
    Jul 13, 2016 at 12:21

1 Answer 1


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&#63;key1=value1&amp;key2=value2" />
  • @Jose Pena does this answer your question?
    – Bob Ortiz
    Jun 3, 2015 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.