1

In my umbraco application I have created error page and then defined in web.config custom error redirect to that page in case of failure like this:

<customErrors mode="RemoteOnly" defaultRedirect="~/Error" />

It works fine in case application returns status 500, but if user wants to access not existing page then redirect does not happen. I even try to specifically define redirect for 404 status like this:

<customErrors mode="RemoteOnly" defaultRedirect="~/Error">
  <error statusCode="404" redirect="~/Error" />
</customErrors>

but still without a success.

2

1 Answer 1

1

The issue was in umbracoSettings.config. The default version of the file contained following rule definition:

<errors>
  <error404>1</error404>
</errors>

It seemingly has overridden the rule defined in web.config and in case of 404 status redirected to page with id "1". Removing the line with error404 everything works as expected:

<errors></errors>

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.