they keep telling me it will not work because it is apache 2.2
Apache 2.4 did add some new goodies involving <If> envelopes, but anything that worked in 2.2 should continue to work in 2.4
RewriteCond %{HTTP_REFERER} (kambasoft|semalt|whatever) [NC]
RewriteRule .* - [F]
are you telling me that this method will work right now?
Haha, now you are ignoring your own rule because you don't spell out which Apache version is meant by "right now" ;)
afaik, there are no significant changes to mod_rewrite between 2.2 and 2.4 except that I think 2.4 allows CIDR ranges in Conditions. (I can now not remember where I read this. phranque?)
The one drawback to using mod_rewrite is that it isn't inherited. So if you have a single .htaccess covering multiple domains, it may be easier to use mod_setenvif:
SetEnvIf Referer kambasoft keep_out
followed later by the single mod_authzwhatsit line
Deny from env=keep_out
I also have found this method for actual URLs
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} semalt\.com [NC]
RewriteRule .* - [F]
That's the same rule again. Not sure what you meant by "actual URLs".
The
RewriteEngine on
directive comes only once, at the beginning of the mod_rewrite section of your htaccess.
The
Options +FollowSymlinks
directive does no harm so long as you remember the + sign -- but if your host allows htaccess, this option has already been set in the config file, so there's rarely a need to repeat it.
There's only one way to find out!
Careful there wilderness :) Sometimes when a rule doesn't work it just fails quietly ... but other times it throws a 500-class error. We would prefer not to see these on our real sites, which is why I have a test site for when-in-doubt experiments.