简体   繁体   English

使用.htaccess阻止子域垃圾邮件引荐

[英]blocking subdomains spam referrals using .htaccess

I want to block the referrals for the subdomains and the main domain of the spam bots and hence am using the following code. 我想阻止垃圾邮件机器人的子域和主域的引荐,因此正在使用以下代码。

RewriteEngine on 
RewriteCond %{HTTP_REFERER} ^http://([^.]+\.)*semalt\.com [OR,NC]
RewriteCond %{HTTP_REFERER} ^http://([^.]+\.)*buttons-for-website\.com [OR,NC]
RewriteCond %{HTTP_REFERER} ^http://([^.]+\.)*simple-share-buttons\.com [NC]
RewriteRule .* - [F]

I have hosted my website on awardspace.com. 我的网站托管在awardspace.com上。

The problem is that I am still seeing referrals from the subdomains of the above mentioned websites. 问题是我仍然看到来自上述网站的子域的引荐。

Relax your regex further using: 使用以下方法进一步放松您的正则表达式:

RewriteEngine on 

RewriteCond %{HTTP_REFERER} (buttons-for-website|semalt|simple-share-buttons)\. [NC]
RewriteRule ^ - [F]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM