- publishing free software manuals
The Apache HTTP Server Reference Manual
by Apache Software Foundation
Paperback (6"x9"), 862 pages
ISBN 9781906966034
RRP £19.95 ($29.95)

Get a printed copy>>>

16.2  Configuration

Use of ErrorDocument is enabled for .htaccess files when the AllowOverride is set accordingly.

Here are some examples…

ErrorDocument 500 /cgi-bin/crash-recover
ErrorDocument 500 "Sorry, our script crashed. Oh dear"
ErrorDocument 500 http://xxx/
ErrorDocument 404 /Lame_excuses/not_found.html
ErrorDocument 401 /Subscription/how_to_subscribe.html

The syntax is,

ErrorDocument <3-digit-code> <action>

where the action can be,

  1. Text to be displayed. Wrap the text with quotes (").
  2. An external URL to redirect to.
  3. A local URL to redirect to.

ISBN 9781906966034The Apache HTTP Server Reference ManualSee the print edition