]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_dir: Document FallbackResource interaction with SetHandler/AddHandler (Bug 69640)
authorRich Bowen <rbowen@apache.org>
Wed, 29 Apr 2026 14:25:55 +0000 (14:25 +0000)
committerRich Bowen <rbowen@apache.org>
Wed, 29 Apr 2026 14:25:55 +0000 (14:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933488 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/core.xml
docs/manual/mod/mod_dir.xml
docs/manual/mod/mod_mime.xml

index c11faa97df1df85519358f5b95e45f03d02296e6..fc514a5582e1aca8a303128d42d0617483f71fdb 100644 (file)
@@ -4890,10 +4890,13 @@ SetHandler imap-file
     <note><title>Note</title>
     <p>Because <directive>SetHandler</directive> overrides default handlers,
     normal behavior such as handling of URLs ending in a slash (/) as
-    directories or index files is suppressed.</p></note>
+    directories or index files is suppressed. It also overrides
+    <directive module="mod_dir">FallbackResource</directive>, since the
+    request already has an explicit handler assigned.</p></note>
 </usage>
 
 <seealso><directive module="mod_mime">AddHandler</directive></seealso>
+<seealso><directive module="mod_dir">FallbackResource</directive></seealso>
 
 </directivesynopsis>
 
index fbe2d0e486f444601ba2d5c94a634e58aecb2ac4..ace86ae350782a821149c7dd9aec9cb9c06165f6 100644 (file)
@@ -238,7 +238,7 @@ a directory</description>
 </directivesynopsis>
 <directivesynopsis>
 <name>FallbackResource</name>
-<description>Define a default URL for requests that don't map to a file</description>
+<description>Define a default URL for requests that don't map to a file or handler</description>
 <syntax>FallbackResource disabled | <var>local-url</var></syntax>
 <default>disabled - httpd will return 404 (Not Found)</default>
 <contextlist><context>server config</context><context>virtual host</context>
@@ -285,7 +285,23 @@ later</compatibility>
     can access the original requested URL via the server variable
     <code>REQUEST_URI</code>. For example, to access this variable in PHP,
     use <code>$_SERVER['REQUEST_URI']</code>.</p>
+    <note><title>Interaction with other handlers</title>
+    <p><directive>FallbackResource</directive> only takes effect when no
+    other handler has been assigned to the request. If a directive such as
+    <directive module="core">SetHandler</directive> or
+    <directive module="mod_mime">AddHandler</directive> has already
+    assigned a handler to a URL or file extension,
+    <directive>FallbackResource</directive> will not override it. For
+    example, if you use
+    <code>SetHandler application/x-httpd-php</code> in a
+    <directive type="section" module="core">Directory</directive> section,
+    that handler applies to all requests in that directory — even requests
+    for non-existent files — so <directive>FallbackResource</directive>
+    will never be invoked.</p></note>
 </usage>
+<seealso><directive module="core">SetHandler</directive></seealso>
+<seealso><directive module="mod_mime">AddHandler</directive></seealso>
+<seealso><directive module="mod_dir">DirectoryCheckHandler</directive></seealso>
 </directivesynopsis>
 <directivesynopsis>
 <name>DirectoryCheckHandler</name>
index 61244eaa5ed801e42f88921b13fd9e7a1068dfd3..1b0449e9d78e2f6bf0621ae6a87c628fd1265a12 100644 (file)
@@ -377,6 +377,7 @@ AddHandler type-map .var
     them.</p>
 </usage>
 <seealso><directive module="core">SetHandler</directive></seealso>
+<seealso><directive module="mod_dir">FallbackResource</directive></seealso>
 </directivesynopsis>
 
 <directivesynopsis>