[EMAIL PROTECTED] (Eric Cholet) wrote:
>Ken Williams wrote:
>> I've done some more digging, and found a rather bizarre explanation.
>> As it turns out, if the parent .htaccess has its directive in a
>> <Files> section and the subdirectory doesn't, the parent will
>> override the child. If they're specified the same way, the child
>> will override the parent.
>>
>> The worst part is that this is _documented_ and supposedly correct:
>> http://www.apache.org/docs/sections.html
>>
>> Seems kind of ridiculous - why should the method we use to specify
>> behavior have any effect on precedence? I feel like I'm probably
>> missing something here, there's probably some reason for this
>> behavior that I'm not thinking of.
>
>Some choice has to be made when merging. If you have something such as:
>
><Directory /foo>
>PerlSetVar someKey someValue
></Directory>
>
><Files *.thtml>
>PerlSetVar someKey otherValue
></Files>
>
>then you issue a request for /foo/bar.thmtl. Both configuration
>directives apply, so a decision has to be made as to which has
>precedence. I agree with you that it's sort of arbitrary, just as the
>opposite would be.
But my gripe is with the following:
------docroot/.htaccess:------------
<Files file.html>
PerlSetVar Lemon Tasty
</Files>
------------------------------------
------docroot/subdir/.htaccess:-----
PerlSetVar Lemon Sour
------------------------------------
Now if I request docroot/subdir/file.html, $r->dir_config('Lemon') gives me
'Tasty'. It seems to me that the lower-level directory .htaccess should always
take precedence over the higher. I think the example you give is a useful one,
but the rules should really only address "tiebreaking" situations, and I think
my example isn't a tie.
------------------- -------------------
Ken Williams Last Bastion of Euclidity
[EMAIL PROTECTED] The Math Forum