From: Rich Bowen
Date: Wed, 29 Apr 2026 14:25:55 +0000 (+0000)
Subject: mod_dir: Document FallbackResource interaction with SetHandler/AddHandler (Bug 69640)
X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e322d7edc5ab8ac756465e39b227cb0e8c56a45;p=thirdparty%2Fapache%2Fhttpd.git
mod_dir: Document FallbackResource interaction with SetHandler/AddHandler (Bug 69640)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933488 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml
index c11faa97df..fc514a5582 100644
--- a/docs/manual/mod/core.xml
+++ b/docs/manual/mod/core.xml
@@ -4890,10 +4890,13 @@ SetHandler imap-file
Note
Because SetHandler overrides default handlers,
normal behavior such as handling of URLs ending in a slash (/) as
- directories or index files is suppressed.
+ directories or index files is suppressed. It also overrides
+ FallbackResource, since the
+ request already has an explicit handler assigned.
AddHandler
+FallbackResource
diff --git a/docs/manual/mod/mod_dir.xml b/docs/manual/mod/mod_dir.xml
index fbe2d0e486..ace86ae350 100644
--- a/docs/manual/mod/mod_dir.xml
+++ b/docs/manual/mod/mod_dir.xml
@@ -238,7 +238,7 @@ a directory
FallbackResource
-Define a default URL for requests that don't map to a file
+Define a default URL for requests that don't map to a file or handler
FallbackResource disabled | local-url
disabled - httpd will return 404 (Not Found)
server configvirtual host
@@ -285,7 +285,23 @@ later
can access the original requested URL via the server variable
REQUEST_URI. For example, to access this variable in PHP,
use $_SERVER['REQUEST_URI'].
+ Interaction with other handlers
+ FallbackResource only takes effect when no
+ other handler has been assigned to the request. If a directive such as
+ SetHandler or
+ AddHandler has already
+ assigned a handler to a URL or file extension,
+ FallbackResource will not override it. For
+ example, if you use
+ SetHandler application/x-httpd-php in a
+ Directory section,
+ that handler applies to all requests in that directory â even requests
+ for non-existent files â so FallbackResource
+ will never be invoked.
+SetHandler
+AddHandler
+DirectoryCheckHandler
DirectoryCheckHandler
diff --git a/docs/manual/mod/mod_mime.xml b/docs/manual/mod/mod_mime.xml
index 61244eaa5e..1b0449e9d7 100644
--- a/docs/manual/mod/mod_mime.xml
+++ b/docs/manual/mod/mod_mime.xml
@@ -377,6 +377,7 @@ AddHandler type-map .var
them.
SetHandler
+FallbackResource