httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48304] with "Rewrite" directives in .../.htaccess and .../foo/.htaccess, impossible to match http://example.com/.../foo
Date Thu, 10 Nov 2011 12:36:40 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48304

--- Comment #2 from Matthew Byng-Maddick <matthew.byng-maddick@bbc.co.uk> 2011-11-10
12:36:40 UTC ---
Created attachment 27918
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=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
distribution.

Cheers

MBM

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message