grep me out of here!

Some months ago, there was a thread about using rewrite rules to prevent the pesky nimbda and code red worms from filling up your error_log with 404 errors. It involved using some rewrite rules to redirect the request elsewhere.

Here is what I ended up using (which I am pretty sure came from this forums):
Code:
RewriteCond %{REQUEST_URI} (cmd\.exe) [OR]
RewriteCond %{REQUEST_URI} (root\.exe) [OR]
RewriteCond %{REQUEST_URI} (\.ida) [OR]
RewriteCond %{REQUEST_URI} (Admin\.dll)
RewriteRule ^.*$ /dev/null [L]
OK, so that gets rid of the hits being logged in error_log but they end up in the access_log ! Two questions grep me out of here!

1) Is there a way to discard these hits and have them not show up in either log?

2) If not, what is a regular expression I could use with grep to filter out those hits from my access_log? I am hopeless at regex, truely lost :p

Thanks
grep me out of here!

 

 

 

 

Top