Webmaster in a Nutshell, 3rd Edition By Robert Eckstein, Stephen Spainhour
Table of Contents
Chapter 18. Apache Configuration
ErrorDocument
ErrorDocument code filename string URL
Allows you to customize the response sent by your server when an error is encountered . The error code is an HTTP status code as listed in Chapter 17. Possible values are:
filename .25i
A local file to return upon encountering this error
string .25i
A message to return upon encountering this error; the string must be surrounded by quotes
URL .25i
A local or remote document to redirect the user to upon encountering this error
Example usage:
ErrorDocument 404 /errors/notfound.html ErrorDocument 408 "Sorry, the server timed out - try again later" ErrorDocument 402 http://www.oreilly.com/payment/