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. It was very confusing that the txt,rnd, and int options would all work correctly and prg would tank without any errors. I got the prg map and logging to work by adding a RewriteOptions inherit 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. b) I think that the syntax checking should catch and warn about programs defined with RewriteEngine off. c) The Apache Server Information display should show which rewrite programs have been loaded. 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. 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. 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'. ...don support (at) microtechniques.com
