Skip to content

Commit 67d58f7

Browse files
committed
docs: Clarify that ErrorDocument text strings are served as text/html, with multi-line HTML example (PR 61152)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933866 13f79535-47bb-0310-9956-ffa450edef68
1 parent e5b3877 commit 67d58f7

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

docs/manual/mod/core.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,22 @@ ErrorDocument 403 Forbidden!
15061506
ErrorDocument 403 /errors/forbidden.py?referrer=%{escape:%{HTTP_REFERER}}
15071507
</highlight>
15081508

1509+
<p>When the argument is a text string (i.e., not a path or URL),
1510+
it is sent to the client with a content type of
1511+
<code>text/html</code>, so you may include HTML markup. You can
1512+
use the backslash line-continuation character to spread the
1513+
document across multiple lines:</p>
1514+
1515+
<highlight language="config">
1516+
ErrorDocument 403 "\
1517+
&lt;html&gt;&lt;head&gt;\
1518+
&lt;title&gt;403 Forbidden&lt;/title&gt;\
1519+
&lt;/head&gt;&lt;body&gt;\
1520+
&lt;h1&gt;Forbidden&lt;/h1&gt;\
1521+
&lt;p&gt;You do not have permission to access this resource.&lt;/p&gt;\
1522+
&lt;/body&gt;&lt;/html&gt;"
1523+
</highlight>
1524+
15091525
<p>Additionally, the special value <code>default</code> can be used
15101526
to specify Apache httpd's simple hardcoded message. While not required
15111527
under normal circumstances, <code>default</code> will restore

0 commit comments

Comments
 (0)