Posts

Showing posts from February, 2020

Sitecore - Custom 500 error page

There's a ton of posts out there showing how to implement a custom 500 error page in Sitecore. However, I am going to propose a new method to accomplish the same, with the possibility to have a content managed error page and a static error page (this method works for multisite implementations).

The scenario is the following, if there's a 500 error we want to display a content managed error page, and if that content managed error page is erroring out as well, we want to display a static error page. Let's see how we can accomplish this.
1. On your web.config add the following: 
<system.web> <customErrors mode="RemoteOnly" redirectMode="ResponseRewrite"> <error statusCode="500" redirect="error.aspx" /> </customErrors> </system.web>
With this, we are basically saying that we do not want a redirection, but instead, the page that is erroring out will have the content of our custom error.as…