Forum Moderators: rogerd & travelin cat
that "bad referrer" domain may not really have any links to your site
I don't know where he/she is from
RewriteCond %{HTTP_REFERER} \.(ru|ua)(/|$) [NC]
RewriteCond %{HTTP_REFERER} !(google|yandex|mail)\.
RewriteRule (^|\.html|/)$ - [F]
I generally constrain my RewriteRules to specific types of request, so the server doesn't have to waste a lot of time evaluating conditions; it's extremely rare for robots to ask for non-page files-- especially when they've already been blocked from the page that calls the other files. (Hotlinks are a separate routine.) There's another rule with the bare condition RewriteCond %{HTTP_REFERER} \.(su|us|mobi|biz)(/|$)
with no exceptions. (google.ua exists; google.biz doesn't.) SetEnvIf Referer semalt keep_out
which works in conjunction with Deny from env=keep_out