如何在IIS上阻止Semalt
发布时间:2020-12-14 19:45:33 所属栏目:资源 来源:网络整理
导读:检查我的Google Analytics我从semalt.com获得了大量流量. 我知道这是一种流量垃圾邮件策略,所以我想完全阻止他们的请求,并阻止它在我的流量统计中出现. 我在这里阅读http://logorrhoea.net/2014/01/how-to-block-semalt-com-referrer-traffic-using-htaccess
检查我的Google Analytics我从semalt.com获得了大量流量.
我知道这是一种流量垃圾邮件策略,所以我想完全阻止他们的请求,并阻止它在我的流量统计中出现. 我在这里阅读http://logorrhoea.net/2014/01/how-to-block-semalt-com-referrer-traffic-using-htaccess/,在Apache上可以这样做: # block visitors referred from semalt.com RewriteEngine on RewriteCond %{HTTP_REFERER} semalt.com [NC] RewriteRule .* - [F] 但我需要它为IIS,可能通过web.config,但如何做到这一点? 解决方法
好的,在这里找到了一些东西:
http://tusksoft.com/blog/posts/6/clean-up-your-google-analytics-and-help-stop-referer-spam-with-this-simple-rewrite-rule:
这似乎有效: <rewrite> <rules> <rule name="abort referer spam requests" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_REFERER}" pattern="(semalt.com)|(buttons-for-website.com)" /> </conditions> <action type="AbortRequest" /> </rule> <!--The rest of your rules,if you have any--> </rules> </rewrite> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |