Problem:
How to customize your html or php error pages.
Solution:
To customize your html or php pages, edit your .htaccess file and add a edit the following entry to fit your site:
ErrorDocument error-number /Your-Error-file.html
For example if I had the file notfound.html in the root directory of my site and I wanted to use it for a 404 error I would use:
ErrorDocument 404 /notfound.html
The other way is a work-around. But works really well. It just redirects the old error page to the new error page.
Make an error page such as Errorpage1.shtml. Then fill out this .htaccess redirect entry.
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^$
RewriteCond %{HTTP_HOST} ^domain.com/400.shtml$
RewriteRule ^$ http://domain.com/errorpage1.shtml [L,R=301]