marc 97/04/10 15:53:20
Modified: htdocs/manual/mod core.html
Log:
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...
Revision Changes Path
1.44 +21 -10 apache/htdocs/manual/mod/core.html
Index: core.html
===================================================================
RCS file: /export/home/cvs/apache/htdocs/manual/mod/core.html,v
retrieving revision 1.43
retrieving revision 1.44
diff -C3 -r1.43 -r1.44
*** core.html 1997/03/25 20:35:35 1.43
--- core.html 1997/04/10 22:53:18 1.44
***************
*** 382,410 ****
one of four things,
<OL>
! <LI>behave like NCSA httpd 1.3
<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><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>URLs will begin with a slash (/) for local URLs, or will be a full
URL which the client can resolve. Examples:
<blockquote><code>
! ErrorDocument 500 /cgi-bin/tester<br>
ErrorDocument 404 /cgi-bin/bad_urls.pl<br>
! ErrorDocument 401 http://www2.foo.bar/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
responses.</A><p><hr>
<A name="errorlog"><h2>ErrorLog directive</h2></A>
--- 382,421 ----
one of four things,
<OL>
! <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>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 sometimes offer additional information regarding the
! problem/error.
! <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 http://foo.example.com/cgi-bin/tester<br>
ErrorDocument 404 /cgi-bin/bad_urls.pl<br>
! ErrorDocument 401 /subscription_info.html<br>
ErrorDocument 403 "Sorry can't allow you access today
</code></blockquote>
! <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>