On Wed, Oct 22, 2008 at 11:22 AM, System Support
<[EMAIL PROTECTED]> wrote:
>
>
> On 22 Oct 2008 at 7:38, Eric Covener wrote:
>
>>
>> It's not in the manual, but RewriteMap programs aren't started when
>> they're defined in a context that doesn't have  "RewriteEngine on".
>>
>> --
>> Eric Covener
>> [EMAIL PROTECTED]
>
> Thanks,
>
> That is not intuitive.  I had a RewriteRule on in the Directory container, 
> but you can not define the
> prg there, so that was done in the containing VirtualHost.  I tried adding 
> the RewriteEngine on,
> and RewriteLogLevel in the master http config but that evidently does not 
> carry through to the
> VirtualHost, which is also not obvious.

The context issue is explicit in the manual

> a) If a rule triggers a prg that has not been loaded, there should be an 
> error in the appache error
> log regardless of the RewriteLogLevel.  I get an error if I specify an 
> invalid RewriteMap txt file, for
> example.

Report it as an enhancement request for mod_rewrite, this is the
context where no log msg is issued:

    /* when `RewriteEngine off' was used in the per-server
     * context then the rewritemap-programs were not spawned.
     * In this case using such a map (usually in per-dir context)
     * is useless because it is not available.


> b) I think that the syntax checking should catch and warn about programs 
> defined with
> RewriteEngine off.

I think a reminder in the doc is sufficient here.  Anyone?

> c) The Apache Server Information display should show which rewrite programs 
> have been
> loaded.

Patches welcome on this one, but there's always ps output for
debugging purposes.


> d) Apparently every VirtualHost has its RewriteLogLevel set to the default of 
> 0.   I would think that
> setting the log level at the top container should override the defaults in 
> the VirtualHosts.  By
> putting a debugging log level in the top container, I am indicating that I do 
> not know where the
> problem is and want everything traced - I should not have to identify where 
> the problem is first so
> that I can identify where the problem is.
>
> This, however, does seem to be consistent with the behavior of the general 
> LogLevel and
> probably has been the source of past discussions.


This is consistent with the rest of mod_rewrite and RewriteOptions doc.

>
> e) The documentation for the RewriteOptions directive should at least mention 
> that inherit
> includes the RewriteLog settings and RewriteEngine settings as well at 
> maps,conditions, and
> rules.  This small change would have cut a week off of my troublshooting 
> since I would have
> wondered why you needed to inherit them and then realized that each 
> VirtualHost had its own
> settings.

I think this is already okay in the doc -- it's not constrained to Rules.

>
> f) The documentation that indicates that the program is started once, when 
> the Apache server is
> started should add 'provided it was *defined* in a RewriteEngine on context'.

I added this earlier this morning.

-- 
Eric Covener
[EMAIL PROTECTED]

Reply via email to