You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jack Bates <ms...@freezone.co.uk> on 2009/11/25 01:09:46 UTC
[users@httpd] Re: RewriteRule in neither "foo/.htaccess" nor ".htaccess" can
match http://example.com/.../foo
> Jack Bates wrote:
> > I'm struggling a bit with this mod_rewrite rule,
>
> I am a bit intimidated by your detailed explanation and the level of
> expertise required to fully understand your requirements, never mind
> finding a solution. But reading your post in diagonals gives me the
> feeling that maybe the sum of your requirements is just a bit too much
> to be covered by generic modules like mod_rewrite et al., which after
> all are generic tools and not specifically designed to cover all
> possible cases and countercases one could come up with.
> It seems like what you want is something like
> /foo to deliver /foo.html
> except if /foo really exists and is a directory, then you would want
> /foo/index.html to be delivered
> except if the directory /foo contains a .htaccess, in which case you
> want the .htaccess-contained rewrite rules to apply
> except if /foo is a sub-directory of another directory already
> containing a .htaccess with rewrite rules in it, in which case these
> should apply too
> I may be jesting a bit, but don't you think this is a bit much to ask ?
Thanks Andre - I take you point : )
Just for clarification, I want,
* /foo/ to deliver /foo/index.html, or whatever it would naturally deliver
* /foo to deliver /foo.html always
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: RewriteRule in neither "foo/.htaccess" nor
".htaccess" can match http://example.com/.../foo
Posted by Eric Covener <co...@gmail.com>.
On 11/24/09, Jack Bates <ms...@freezone.co.uk> wrote:
> * /foo/ to deliver /foo/index.html, or whatever it would naturally deliver
> * /foo to deliver /foo.html always
IIUC, your problem boils down to:
/.htaccess has your desired behavior
/foo/.htaccess has some undesired, incompatible catch-all behavior
Sounds like you'd be a customer for the enhancement suggested here:
https://issues.apache.org/bugzilla/show_bug.cgi?id=39313
Which makes the inherited rules run before the more specific rules. At
least you'd have a fighting chance with the other order.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org