httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] log certain rewrites?
Date Mon, 20 Oct 2003 05:50:56 GMT
John Smith wrote:
> I use mod_rewrite to redirect requests for images
> linked to by leaching sites. Is there a way to log
> these? (I'd like to know the URLs)

Yes, I think, you could insert a rule that sets an environment variables,
which then is a condition for logging.

A pure guess:

    CustomLog logs/leacher_log referer env=leach_req

    # conditions
    RewriteRule ^/img/.* /dont_leach.png [env=leach_req:1]

See:
http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html#rewriterule
http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#customlog

Regards,
Robert Andersson


---------------------------------------------------------------------
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


Mime
View raw message