: Well you can go here http://aaronlogan.com/downloads/htaccess.php and have a pretty big list of referrer spam blocks in your htaccess. Or you can use something like the following # set the spam_ref
Well you can go here aaronlogan.com/downloads/htaccess.php and have a pretty big list of referrer spam blocks in your htaccess. Or you can use something like the following
# set the spam_ref variable - referrer site or a keyphrase
SetEnvIfNoCase Referer "^http://(www.)?some-spammer.com" spam_ref=1
SetEnvIfNoCase Referer "^http://(www.)?other-spammer.com" spam_ref=1
SetEnvIfNoCase Referer "^casino-poker" spam_ref=1
# block all referres that have spam_ref set
<FilesMatch "(.*)">
Order Allow,Deny
Allow from all
Deny from env=spam_ref
</FilesMatch>
Or if you are using php.
<?php
$block = array("xxx.xxx.xxx.xxx", "yy.yy.y.yyy");
if (in_array ($_SERVER['REMOTE_ADDR'], $block)) {
header("Location: google.com/ );
exit();
}
?>
Either way you will need to keep on top of it and update as necessary. And the list can get huge.
More posts by @Bethany197
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.