ErrorDocument directive


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


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 launced 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.


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


ErrorDocument 403 /cgi-bin/notallowed.cgi
ErrorDocument 500 /serverError.html
ErrorDocument 501 /error/notImplemented.html

[BACK]Return to Resource Configuration File Overview

NCSA httpd Development Team