summaryrefslogtreecommitdiffstats
path: root/docs/manual
diff options
context:
space:
mode:
authorGraham Leggett <minfrin@apache.org>2010-11-20 22:39:23 +0100
committerGraham Leggett <minfrin@apache.org>2010-11-20 22:39:23 +0100
commit476bd51775c8663a8b2e06d280d655ab7987e8a6 (patch)
tree84a693a582ac513c3cc3c3c482e2393e3e886c59 /docs/manual
parentUpdate status of ap_expr and Limit (diff)
downloadapache2-476bd51775c8663a8b2e06d280d655ab7987e8a6.tar.xz
apache2-476bd51775c8663a8b2e06d280d655ab7987e8a6.zip
mod_include: Add the onerror attribute to the include element, allowing
an URL to be specified to include on error. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037335 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual')
-rw-r--r--docs/manual/mod/mod_include.xml31
-rw-r--r--docs/manual/new_features_2_4.xml7
2 files changed, 33 insertions, 5 deletions
diff --git a/docs/manual/mod/mod_include.xml b/docs/manual/mod/mod_include.xml
index 9c479f4460..f843718a77 100644
--- a/docs/manual/mod/mod_include.xml
+++ b/docs/manual/mod/mod_include.xml
@@ -331,9 +331,10 @@
scripts are invoked as normal using the complete URL given in
the command, including any query string.</p>
- <p>An attribute defines the location of the document; the
- inclusion is done for each attribute given to the include
- command. The valid attributes are:</p>
+ <p>An attribute defines the location of the document, and may
+ appear more than once in an include element; an inclusion is
+ done for each attribute given to the include command in turn.
+ The valid attributes are:</p>
<dl>
<dt><code>file</code></dt>
@@ -359,11 +360,11 @@
<p>If the specified URL is a CGI program, the program will be
executed and its output inserted in place of the directive in the
parsed file. You may include a query string in a CGI url:</p>
-
+
<example>
&lt;!--#include virtual="/cgi-bin/example.cgi?argument=value" --&gt;
</example>
-
+
<p><code>include virtual</code> should be used in preference
to <code>exec cgi</code> to include the output of CGI programs
into an HTML document.</p>
@@ -376,6 +377,26 @@
requests.</p>
</dd>
+
+ <dt><code>onerror</code></dt>
+ <dd><p>The value is a (%-encoded) URL-path which is shown should a
+ previous attempt to include a file or virtual attribute failed.
+ To be effective, this attribute must be specified after the
+ file or virtual attributes being covered. If the attempt to
+ include the onerror path fails, or if onerror is not specified, the
+ default error message will be included.</p>
+
+ <example>
+ # Simple example<br />
+ &lt;!--#include virtual="/not-exist.html" onerror="/error.html" --&gt;
+ </example>
+
+ <example>
+ # Dedicated onerror paths<br />
+ &lt;!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --&gt;
+ </example>
+
+ </dd>
</dl>
</section> <!-- /include -->
diff --git a/docs/manual/new_features_2_4.xml b/docs/manual/new_features_2_4.xml
index b4a9aa74b6..94539bd5d9 100644
--- a/docs/manual/new_features_2_4.xml
+++ b/docs/manual/new_features_2_4.xml
@@ -107,6 +107,13 @@
<dt><module>mod_allowmethods</module></dt>
<dd>New module to restrict certain HTTP methods without interfering with
authentication or authorization.</dd>
+
+ <dt><module>mod_include</module></dt>
+
+ <dd>Support for the 'onerror' attribute within an 'include' element,
+ allowing an error document to be served on error instead of the default
+ error string.</dd>
+
</dl>
</section>