Hi,

While trying to debug some non-working mod_rewrite rules I found out that httpd does not log anything to the mod_rewrite log file.

mod_rewrite works just fine with permanent redirect rules like this:

RedirectMatch permanent (.*)cmd.exe(.*)$ http://www.microsoft.com
RedirectMatch permanent (.*)root.exe(.*)$ http://www.microsoft.com
RedirectMatch permanent (.*)\/_vti_bin\/(.*)$ http://www.microsoft.com
RedirectMatch permanent(.*)\/scripts\/\.\.(.*)$http://www.microsoft.com

These rules to stop these myspace and blogspots inlines don't seem to work at all:

  RewriteCond %{HTTP_REFERER} !^$
  RewriteCond %{HTTP_REFERER} !^http://www.uucheyenne.org/.*$ [NC]
  RewriteRule .*\.jpg$        -                                    [F]


I'm using this in my httpd.conf file:

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteLog "logs/rewrite.log"
  RewriteLogLevel 3

I have gone all the way to RewriteLogLevel 9 and still had no output.

If I delete the current (0 byte) /var/www/logs/rewrite.log, httpd will create a new one when I do apachectl stop && sleep 1 && apachectl startssl.

mod_gzip also does not log. I redirect error logs to syslog and use custom logging to a fifo for the access logs and both of these work fine.

I sure would appreciate any clues.

Jeff Ross

Reply via email to