Name
ErrorDocument
Synopsis
ErrorDocumentcode
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/
Get Webmaster in a Nutshell, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.