>>>>> "justin" == justin <[EMAIL PROTECTED]> writes:
justin> The last time I traced mod_rewrite on the front-end, and map files,
justin> discovered it opens, reads, and closes, the file *every single request*.
justin> I use a map like that to block IPs fast, but thought that was rather
justin> inefficient? should I not be concerned about such trifles?
I have this code in my mod_rewrite:
RewriteCond /web/stonehenge/var/blocked/REMOTE_ADDR-%{REMOTE_ADDR} -f
RewriteRule .* http://YOUR-HOST-BLOCKED-FOR-EXCESSIVE-CONSUMPTION [redirect,last]
Then, when I want to block 10.1.2.3, I simply touch
/web/stonehenge/var/blocked/REMOTE_ADDR-10.1.2.3
I figure the OS is better at a file lookup than apache is at parsing
a long file. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html