Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Phuong 6 posts 36 karma points
    Sep 12, 2018 @ 03:32
    Phuong
    0

    Custom not found 404

    I have already add the custom error to handle case 404 in the web.config.

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

    Then it works well with some resource not exist in our system. But when I try with mydomain/imagegen.ashx?image=notexistimage, it's still display the default page not found, that's not my custom not found page.

    enter image description here

    Could someone help me resolve it?

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Sep 12, 2018 @ 11:55
    Douglas Robar
    0

    Catching errors is, unfortunately, more complex than might be supposed. Here's a great blog post that should help.

    https://blog.mortenbock.dk/2017/02/03/error-page-setup-in-umbraco/ along with some docs at https://our.umbraco.com/documentation/reference/config/umbracosettings/#errors

    cheers,
    doug.

Please Sign in or register to post replies

Write your reply to:

Draft