]> granicus.if.org Git - apache/commitdiff
Update the ErrorDocument information to clarify a few things,
authorMarc Slemko <marc@apache.org>
Thu, 10 Apr 1997 22:53:18 +0000 (22:53 +0000)
committerMarc Slemko <marc@apache.org>
Thu, 10 Apr 1997 22:53:18 +0000 (22:53 +0000)
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

docs/manual/mod/core.html

index 04fe22dee46e7ef5d6f87cedc80db3679855622a..08b4e573f02ed5079d9106ee2e888b188830e65f 100644 (file)
@@ -382,29 +382,40 @@ In the event of a problem or error, Apache can be configured to do
 one of four things,
 
 <OL>
-<LI>behave like NCSA httpd 1.3
+<LI>output a simple hardcoded error message
 <LI>output a customized message
 <LI>redirect to a local URL to handle the problem/error
 <LI>redirect to an external URL to handle the problem/error
 </OL>
 
-<P>2-4 are configured using <CODE>ErrorDocument</CODE>, which
-is followed by the HTTP response code and a message or URL.
+<P>The first option is the default, while options 2-4 are configured 
+using the <CODE>ErrorDocument</CODE> directive, which is followed by 
+the HTTP response code and a message or URL.
 
-<P><em>Messages</em> in this context, begin with a single quote
-(<code>"</code>), which does not form part of the message itself. Apache will
-sometime offer additional information regarding the problem/error. 
+<P><em>Messages</em> in this context begin with a single quote
+(<code>"</code>), which does not form part of the message itself. 
+Apache will sometimes offer additional information regarding the 
+problem/error. 
 
-<P>URLs will begin with a slash (/) for local URLs, or will be a full
+<P>URLs can begin with a slash (/) for local URLs, or be a full
 URL which the client can resolve. Examples:
 <blockquote><code>
-ErrorDocument 500 /cgi-bin/tester<br>
+ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br>
 ErrorDocument 404 /cgi-bin/bad_urls.pl<br>
-ErrorDocument 401 http://www2.foo.bar/subscription_info.html<br>
+ErrorDocument 401 /subscription_info.html<br>
 ErrorDocument 403 "Sorry can't allow you access today
 </code></blockquote>
 
-See Also: <A HREF="../custom-error.html">documentation of customizable
+<P>Note that when you specify an <CODE>ErrorDocument</CODE> 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 <STRONG>if you use an "ErrorDocument 401"
+directive then it must refer to a local document.</STRONG>  This results
+from the nature of the HTTP basic authentication scheme.
+
+<P>See Also: <A HREF="../custom-error.html">documentation of customizable
 responses.</A><p><hr>
 
 <A name="errorlog"><h2>ErrorLog directive</h2></A>