]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
docs: Clarify that ErrorDocument text strings are served as text/html, with multi...
authorRich Bowen <rbowen@apache.org>
Tue, 5 May 2026 21:07:21 +0000 (21:07 +0000)
committerRich Bowen <rbowen@apache.org>
Tue, 5 May 2026 21:07:21 +0000 (21:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933866 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/core.xml

index ed22cf463f7c40b22e8154797f0df39a4076947b..90d5b62802fcb27e725d1d7f08e2ab6c21e24314 100644 (file)
@@ -1506,6 +1506,22 @@ ErrorDocument 403 Forbidden!
 ErrorDocument 403 /errors/forbidden.py?referrer=%{escape:%{HTTP_REFERER}}
     </highlight>
 
+    <p>When the argument is a text string (i.e., not a path or URL),
+    it is sent to the client with a content type of
+    <code>text/html</code>, so you may include HTML markup. You can
+    use the backslash line-continuation character to spread the
+    document across multiple lines:</p>
+
+    <highlight language="config">
+ErrorDocument 403 "\
+&lt;html&gt;&lt;head&gt;\
+&lt;title&gt;403 Forbidden&lt;/title&gt;\
+&lt;/head&gt;&lt;body&gt;\
+&lt;h1&gt;Forbidden&lt;/h1&gt;\
+&lt;p&gt;You do not have permission to access this resource.&lt;/p&gt;\
+&lt;/body&gt;&lt;/html&gt;"
+    </highlight>
+
     <p>Additionally, the special value <code>default</code> can be used
     to specify Apache httpd's simple hardcoded message.  While not required
     under normal circumstances, <code>default</code> will restore