From: Marc Slemko Date: Thu, 10 Apr 1997 22:53:18 +0000 (+0000) Subject: Update the ErrorDocument information to clarify a few things, X-Git-Tag: APACHE_1_2b9~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=620d637aca18b2bf175f18b95c77e1259c9d4a7d;p=apache Update the ErrorDocument information to clarify a few things, especially the handling of 401 responses. The example that was in the docs before would never work! No wonder people have trouble with it... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@77838 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/core.html b/docs/manual/mod/core.html index 04fe22dee4..08b4e573f0 100644 --- a/docs/manual/mod/core.html +++ b/docs/manual/mod/core.html @@ -382,29 +382,40 @@ In the event of a problem or error, Apache can be configured to do one of four things,
    -
  1. behave like NCSA httpd 1.3 +
  2. output a simple hardcoded error message
  3. output a customized message
  4. redirect to a local URL to handle the problem/error
  5. redirect to an external URL to handle the problem/error
-

2-4 are configured using ErrorDocument, which -is followed by the HTTP response code and a message or URL. +

The first option is the default, while options 2-4 are configured +using the ErrorDocument directive, which is followed by +the HTTP response code and a message or URL. -

Messages in this context, begin with a single quote -("), which does not form part of the message itself. Apache will -sometime offer additional information regarding the problem/error. +

Messages in this context begin with a single quote +("), which does not form part of the message itself. +Apache will sometimes offer additional information regarding the +problem/error. -

URLs will begin with a slash (/) for local URLs, or will be a full +

URLs can begin with a slash (/) for local URLs, or be a full URL which the client can resolve. Examples:

-ErrorDocument 500 /cgi-bin/tester
+ErrorDocument 500 http://foo.example.com/cgi-bin/tester
ErrorDocument 404 /cgi-bin/bad_urls.pl
-ErrorDocument 401 http://www2.foo.bar/subscription_info.html
+ErrorDocument 401 /subscription_info.html
ErrorDocument 403 "Sorry can't allow you access today
-See Also: documentation of customizable +

Note that when you specify an ErrorDocument that +points to a remote URL (ie. anything with a method such as "http" in +front of it) Apache will send a redirect to the client to tell it +where to find the document, even if the document ends up being +on the same server.. This has several implications, the +most important being that if you use an "ErrorDocument 401" +directive then it must refer to a local document. This results +from the nature of the HTTP basic authentication scheme. + +

See Also: documentation of customizable responses.


ErrorLog directive