From: Tony Finch Date: Tue, 21 Mar 2000 18:28:27 +0000 (+0000) Subject: Explain the changed ErrorDocument syntax. X-Git-Tag: APACHE_2_0_ALPHA_2~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac23f18cd5678c73b3016c785e792957d0b2751d;p=apache Explain the changed ErrorDocument syntax. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84813 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/core.html b/docs/manual/mod/core.html index 8e27e8683d..0d6e886bd5 100644 --- a/docs/manual/mod/core.html +++ b/docs/manual/mod/core.html @@ -794,7 +794,8 @@ please avoid that. HREF="directive-dict.html#Compatibility" REL="Help" >Compatibility: The directory and .htaccess contexts -are only available in Apache 1.1 and later.

+are only available in Apache 1.1 and later. The quoting syntax prior to +Apache 2.0 was different.

In the event of a problem or error, Apache can be configured to do one of four things, @@ -808,30 +809,30 @@ one of four things,

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 sometimes offer additional information regarding the -problem/error. +the HTTP response code and a URL or a message. Apache will sometimes +offer additional information regarding the problem/error.

URLs can begin with a slash (/) for local URLs, or be a full -URL which the client can resolve. Examples: +URL which the client can resolve. Alternatively, a message can be +provided to be displayed by the browser. Examples:

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

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

Prior to version 2.0, messages were indicated by prefixing them +with a single unmatched double quote character.

See Also: documentation of customizable responses.


diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 765856e416..d8573df97a 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2340,7 +2340,6 @@ static const command_rec core_cmds[] = { "Name(s) of per-directory config files (default: .htaccess)" }, { "DocumentRoot", set_document_root, NULL, RSRC_CONF, TAKE1, "Root directory of the document tree" }, -/* TODOC: ErrorDocument no longer has silly quoting semantics */ { "ErrorDocument", set_error_document, NULL, OR_FILEINFO, TAKE2, "Change responses for HTTP errors" }, { "AllowOverride", set_override, NULL, ACCESS_CONF, RAW_ARGS,