Custom error pages, query string parameter added

Gleb Itenberg asked on October 16, 2018 10:59

I'v added custom error pages, like this:

  <httpErrors errorMode="Custom" existingResponse="Auto">
      <remove statusCode="404" subStatusCode="-1" />
      <remove statusCode="500" subStatusCode="-1" />
      <error statusCode="404" path="~/404" responseMode="ExecuteURL" prefixLanguageFilePath="" />
      <error statusCode="500" path="/500" responseMode="ExecuteURL" prefixLanguageFilePath="" />
  </httpErrors>

Redirect works, but add parameter to URL: http://example.com/404/?404;http://example.com:80/sdsd/

This look like it is something added by Kentico. How can I avoid this?

Recent Answers


Peter Mogilnitski answered on October 16, 2018 14:57 (last edited on October 16, 2018 14:58)

Check the documentation it is all in described there.

<system.web>
...
    <customErrors mode="RemoteOnly">
        <error statusCode="404" redirect="~/CMSMessages/404.aspx" />
        ...
    </customErrors>
...
</system.web>
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.