So, who wants a site where instead of getting a default "Error 404" page in that ghastly font (Times) when you type the wrong address, you get a beautiful "Error 404" page that fits with your site's layout, colour and font scheme?
Well, if you do, I'm going to show you how to do it with .htaccess.
---
The most commonly occuring error pages are:
400 Bad Request 401 Authorization Required 403 Forbidden 404 Page Not Found 500 Internal Server Error 503 Service Unavailable Open up a new file in your favourite text editor. Enter this:
ErrorDocument 400 /400.htmErrorDocument 401 /401.htmErrorDocument 403 /403.htmErrorDocument 404 /404.htmErrorDocument 500 /500.htmErrorDocument 501 /501.htmChange "/400.htm" etc. to the server path (not URL) of the error document. Now, save this file as "htaccess.txt" and upload/FTP it to your webspace (if you want it to affect all of your directories, make sure it is in "public_html" or "www". Then rename it to ".htaccess" (remember the dot).
There you go! Type in an incorrect address at your domain, and it should come up with your custom error document.