Using Apache 2.2.x -- my usual approach to blocking script kiddies from looking for various scripts on the server is to use dynamically created 'deny from' lists with the offending ip's. Works, but is always at least a step behind.
So, thinking about using mod_rewrite to real-time send malicious users looking for a specific script somewhere else (specifically, forcing a 403 error). I've tried a couple of things, but they don't seem to be working. For example, suppose the script is evildoing.php. Some script kiddie somewhere runs bots looking for this script on my server -- e.g., an URL might be http://www.myserver.com/evildoing.php. So, in httpd.conf,
<IfModule mod_rewrite.c>
RewriteEngine On
ReWriteCond ${REQUEST_URI} evildoing.php [NC]
RewriteRule ^(.*)$ - [F,L]
</IfModule>
But, this doesn't work - at least, not as written. [And yes, mod_rewrite is statically compiled into apache on this machine.]
Pointers to the obvious thing I'm doing wrong? [First time using rewrite, so...]