Copied to clipboard

Flag this post as spam?

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


  • Bhudsarin C. 6 posts 86 karma points
    Sep 15, 2018 @ 12:17
    Bhudsarin C.
    0

    Custom 404 and 500 error page

    Hi everyone,

    I would like to custom 404 and 500 error page.

    For 404, I decided to set my own 404 finder and follow as this link https://our.umbraco.com/documentation/reference/routing/request-pipeline/icontentfinder

    I added a line at web.config. This made 404 worked well.

    <httpErrors existingResponse="PassThrough" />

    But when I want to custom 500 error page with calling static html. It cannot working.

    <httpErrors errorMode="Custom" existingResponse="PassThrough">    
          <remove statusCode="500"/>
          <error statusCode="500" path="Errors.html" responseMode="File"/></httpErrors>
    

    Do someone knows how to set up both of them in web.config? How to make them work together for my case?

    Thank you

  • Nik 1612 posts 7258 karma points MVP 7x c-trib
    Sep 15, 2018 @ 12:39
    Nik
    100

    Hi Bhudsarin,

    I use this article as a reference when setting up error pages on sites:

    https://blog.mortenbock.dk/2017/02/03/error-page-setup-in-umbraco/

    It's a great article that talks about the various scenarios you need to consider. Hopefully should get you set up with a 500 page.

    It's important to note that your 500 page won't generally have content managed in the CMS but be a static file :-)

    Cheers

    Nik

Please Sign in or register to post replies

Write your reply to:

Draft