Gail’s Tutorial on Customized Error Messages
While the other things listed here work, I like all my custom error messages in a single directory. If that is what you want, read on. All stuff in parens are the shell commands to do what I’ve told you to do.
1. Create a file in the root directory of your web server named .htaccess that contains:
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
and make sure that the protection on the file allows world read access (chmod 644 .htaccess). NOTE: Most web browsers won’t let you look at .htaccess, even though it has world read permission.
2. Create a directory named errors (mkdir errors) and set the protections to world read/execute (chmod 755 errors)
3. Inside that directory, create
400.html
401.html
403.html
404.html
and make sure they are world readable (chmod 644 *.html, if you are in that directory)
These files should explain to the user what the error message means in plain English. It is also a good idea to give them pointers to at least your home page and possibly to the most popular pages on your site. Go to: http://www.yoga4good.com/errors/ to see the ones on one of my sites.
4. Test them out by triggering the error codes.
If you have problems, you can always check your error.log to see what errors are being generated.
Hope this helps!
Gail
========
May also look at this from wiki.dreamhost.com.
-EOF-