httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 48304] with "Rewrite" directives in .../.htaccess and .../foo/.htaccess, impossible to match
Date Thu, 10 Nov 2011 12:36:40 GMT

--- Comment #2 from Matthew Byng-Maddick <> 2011-11-10
12:36:40 UTC ---
Created attachment 27918
Patch to modules/mappers/mod_rewrite.c to allow override of the "don't process
.htaccess in the directory without a trailing slash" behaviour

This behaviour really should be configurable by the use of a RewriteOptions
option. In our case, the issue is actually that we're trying to use .htaccess
to allow rewriting and proxying of an entire URL space (including the variant
without the trailing slash), and while we can turn DirectorySlash Off in
mod_dir, you cannot turn this behaviour off in mod_rewrite.

The "by design" includes the comment:
     *  .htaccess file is called before really entering the directory, i.e.:
     *  URL: http://localhost/foo  and .htaccess is located in foo directory
     *  Ignore such attempts, since they may lead to undefined behaviour.

And as best I can tell, this "undefined behaviour" is mod_rewrite's
RewriteRules kicking in before mod_dir does in the handling of the request
without the trailing slash, and, while it's important that the default
behaviour is this, it really should be possible to say "no, I really want you
to handle that".

I've attached a fairly trivial patch that allows this through the use of a
"RewriteOptions AllowNoSlash" directive. We're probably going to patch this
locally anyway, but it would be good to get it back into the upstream httpd



Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message