https://issues.apache.org/bugzilla/show_bug.cgi?id=47184
Summary: Feature request: DirectoryHandler
Product: Apache httpd-2
Version: 2.3-HEAD
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: mod_dir
AssignedTo: [email protected]
ReportedBy: [email protected]
An awful lot of RewriteRules are written to perform an action that might be
better done with a new directive: DirectoryHandler DirectoryHandler would cause
all (unhandled) requests directed at a particular directory to be handled by a
particular URI or file.
For example:
DirectoryHandler index.php
would replace
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [PT]
This would replace the rewriterule set that comes with virtually every PHP
application out there which maps all requests to an index.php file that
examines the requested URI and does something with it.
Note that this behavior can be half-way simulated using a ErrorDocument 404
directive, but ErrorDocument discards POST data, and so doesn't really do what
we want.
DirectoryHandler could optionally have a flag of some kind that enables or
disables the action performed by those two RewriteCond directives - that is, by
default, DirectoryHandler would catch requests that didn't map to a valid
resource, but perhaps there are cases where you want it to map to that handler
regardless of the presence or absence of files in that location.
There's no urgency on this, it's just a long-standing pet peeve of mine that
I'd like to see handled in 2.4
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]