通过.htaccess阻止僵尸网站

时间:2015-03-24 17:50:45

标签: apache .htaccess mod-rewrite bots spam

我刚写了一些重写条件,以阻止一堆僵尸网站。我成功地阻止了其中许多,除了三个包含连字符(短划线)。因此,由于它们都包含“按钮”这个词,我试图用以下重写条件拦截它们:

RewriteCond %{HTTP_REFERER} ^http://.*buttons.*\.com/ [NC,OR]

我的 .htaccess 中的整个重写代码如下所示:

RewriteCond %{HTTP_REFERER} ^http://.*buttons.*\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*darodar\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*webextract\.net/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*makemoneyonline\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*semalt\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ranksonic\.info/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*smailik\.com/ [NC]

我未能阻止的3个网站是:

social-buttons.com
buttons-for-website.com
simple-share-buttons.com

以及子域名的一些变体。

我的看法是上面的条件应该拦截它们。但我一直在收到垃圾邮件。知道我做错了吗?

0 个答案:

没有答案
相关问题