Last updated on December 10th, 2015 at 06:29 am

This is a common issue faced by webmasters when they redirect 404 error pages to a customized webpage.

There are two issues that usually pops up from this setting

1)The 404 error page just prints the filename and does not execute the file.
2)Browser does not show the error page at all even after doing the above step.

The 1st error can be rectified by putting a forward slash [ / ] before the customized error filename inside httpd.conf
For example if you have a error page named error_display.html then your httpd.conf ErrorDocument should look like this.

ErrorDocument 404 "/error_display.html"

If you have missed the forward slash then you will only get the file name printed on the browser.

The 2nd error is usually seen in Internet Explorer. If you try on other browsers it should work. This is because in IE it is having a certain size limit for the error files 512 to 1024. So in order to solve this issue create a file with some bigger size and retry. This is always controlled by the Show Friendly HTTP Error Pages Settings.

Disable this by going to Tools > Internet Options > Advanced TAB
Under BROWSING scroll down and find the setting with the name “Show driendly HTTP error pages”. Uncheck that and click Apply.
Reload the page it should start working.

The above settings can only be made from your side, The users or your website visitors may still experience the same issue.

So the best possible solution is increase the error file size.

TIP:- Always restart your Apache instance in case you have edited the httpd.conf file.

Leave a Reply

Your email address will not be published. Required fields are marked *