ErrorDocument directive

Purpose

The ErrorDocument directive points the server to a file to send in place of the builtin error message.


Syntax

ErrorDocument type filename

Where type is one of:

And filename is a CGI script or text/html file with full path from document root. CGI scripts launched via these errors have 3 new environment variables, REDIRECT_REQUEST, REDIRECT_URL and REDIRECT_STATUS. They also take as input the error reason of the form err_string=error_reason. For an example script, see an example.


File

srm.conf

Default

If this directive is left out, the compiled error messages will be used.


Examples

ErrorDocument 403 /cgi-bin/notallowed.cgi
ErrorDocument 404 /cgi-bin/nph-error.pl
ErrorDocument 500 /serverError.html
ErrorDocument 501 /error/notImplemented.html
For more information on Error scripts


[Back] Return to Resource Configuration File Overview
NCSA HTTPd Development Team / httpd@ncsa.uiuc.edu / Last Modified 7-12-95