Forum Moderators: phranque
RewriteCond %{HTTP_REFERER}<>%{HTTP_USER_AGENT} ^-<>¦<>-$
This blocks a user-agent of "hyphen" or a Referrer from "hyphen".
These are called "fake blank user-agents" and "fake blank referers". The reason is that if a user-agent or referer is truly blank, then Apache shows it as a double-quoted hyphen in your access log file.
Webmasters often block blank UAs and referrers. So, the bad guys changed their referrers to a single hyphen. It won't be blocked by a rule intended to block blank referrers, and yet it looks like a normal blank referrer in your access log. Same for the user-agent.
Suggestion:
Your code above does the second function, and I've posted the code for the first function recently, but I can't search for it right now.
Jim
I've posted the code for the first function recently, but I can't search for it right now.
I believe this thread contains Jim's reference:
[webmasterworld.com...]