I have had a guestbook on my site but removed it due to guestbook spamming. Now I still get hits to the removed directory, generating a lot of 404 errors in my logs. I would like to stop the entries in the log by simply denying access to anyone trying to access the directory it was in by matching any directory that has the string "directory" in it, as the spammers try variations on the pathname.
I tried to do this:
- Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^guestbook$ - [F]
But this does not work. Blocking access based on referer does not work as the spamming comes from hijacked machines and thus the address it comes from is unpredictable.
Any suggestions on how to solve this?