httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45793] New: mod_rewrite should warn or fail when used inside <location>
Date Fri, 12 Sep 2008 14:17:15 GMT

           Summary: mod_rewrite should warn or fail when used inside
           Product: Apache httpd-2
           Version: 2.2.3
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite

mod_rewrite directives are allowed within <location>, where they behave as if
they are inside a <directory> or .htaccess file. This is highly unintuitive and
thus very difficult to debug. 

The distinction between <Location> and <Directory> is that one operates on
URLs, the other on file paths. mod_rewrite operates on file paths in both
contexts. Since the documentation states that use of mod_rewrite inside
<location> is both unnecessary and unsupported, Apache should either warn or
fail saying "mod_rewrite is not supported within <location> directives" or
similar. This would help prevent mysterious configuration errors.

More generally, I question the wisdom of having such context-dependent
behaviour in the first place. URL matching and file path matching are distinct
operations and should have distinct directives. Of course, I accept we're
probably stuck with it now...

(Yes, I have just wasted two days of my life trying to work out why my rewrites
were behaving oddly)

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