One of the features used in my website is custom error pages, which allow errors to be handled using a format that matches other documents on the site.
Apache users can configure custom error messages using .htaccess. Once pages have been created for an error message, include a directive in the .htaccess file as follows:
ErrorDocument error-code document
ErrorDocument 404 /errors/404-notfound.shtml will redirect any page not found (HTTP error 404) errors to display the /errors/404-notfound.shtml document.
Full details for Apache users may be found in the Apache core features documentation.
Microsoft Internet Information Server (IIS) users can find information on configuring custom error messages in the IIS 6.0 Operations Guide.
RFC 2616 details all of all HTTP status (including error) codes.