httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <>
Subject Re: Stopping rewrites from higher directories?
Date Tue, 08 Oct 1996 06:10:28 GMT
On Sat, 5 Oct 1996, Ralf S. Engelschall wrote:
> 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. 

I'm presuming one can set "RewriteOptions inherit" in the top-level .htaccess,
or in the .conf files, and get the same behavior?  

> 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.

Cool.  This "do the virtualhosts inherit settings from outside <virtualhost>
sections" question is biting us in the ass too frequently, so it's good to do
as you did.

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

Since it's now a part of the core distribution, please let us know when you
update it, and what the changes are.



View raw message