httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <>
Subject Re: Stopping rewrites from higher directories?
Date Sat, 05 Oct 1996 14:19:12 GMT
On 4 Oct 1996 15:07:16 +0100 in en.lists.apache-new-httpd you wrote:
> I am having a few probs with mod_rewrite because of the following
> phenomena:

> If I have this in the .htaccess of my top docs directory

> RewriteRule ^foo\.html$ /cgi-bin/

> Then this works but it is also applied if I access any subdirectory of
> docs; unless I set AllowOverride None. (presumably decause all higer
> directories are consulted).

> Is there some way of turning off this behaviour?  ie can I
> redirect/rewrite just from particular directories and not their
> subdirectories?

Yes, that can be considered either as a bug or a feature.  I implemented it
this way for a feature but you are right: in most cases this act like a bug
:-( I changed the default behaviour to _NOT_ inherit configuration which is
more correct for near 99% of all cases. When someone now wants to inherit
rules from parent dir .htaccess files he now has to use "RewriteOptions
inherit" in the subdirs .htaccess file. Same for per-server configuration
files. Per default the virtual hosts are not longer inherit the rules of a
main server.  If one needs the rules it has to be explicitly said.

This change I've incorporated in the bugfix release 2.3.4. Just grab it from
the mod_rewrite homepage.

                                        Ralf S. Engelschall    

View raw message