MSIE & Apache Customize Error Page

To customize the Error 404 page output from Apache web server , edit httpd.conf with the following :

ErrorDocument 404 /custom-page/404error.html

However, MS IE5+ browser by default will display it’s own “Friendly error Message” in case your apache server does not have it’s own customized error page , or if the page size is less than 512bytes.

Apache server’s customized error page does not necessarily to be a page , it can be a script , e.g. php script :

ErrorDocument 404 /custom-page/404-error.php

Note the php script’s output HTML content should also be larger than 512bytes.

If the output error page can’t have too much content up to 512bytes, simply insert enough space characters & nbsp; into it .

References : Ref1

You may also like...