如何在IIS上阻止Semalt [英] How do I block Semalt on IIS
问题描述
检查我的Google Analytics我从semalt.com获得了大量流量。
我知道这是一种流量垃圾邮件策略,所以我想完全阻止他们的请求,并阻止它提高我的流量统计数据。
Checking my Google Analytics I'm getting a lot of traffic from semalt.com. I know this is a traffic spam tactic, so I want to completely block their requests and stop it from turning up in my traffic stats.
我在这里阅读 http://logorrhoea.net/2014/01/how -to-block-semalt-com-referrer-traffic-using-htaccess / 在Apache上可以这样做:
I read here http://logorrhoea.net/2014/01/how-to-block-semalt-com-referrer-traffic-using-htaccess/ that on Apache it can be done like:
# block visitors referred from semalt.com
RewriteEngine on
RewriteCond %{HTTP_REFERER} semalt\.com [NC]
RewriteRule .* - [F]
但是我需要IIS,可能是通过web.config,但是怎么做?
but I need it for IIS, probably via the web.config, but how to do it?
推荐答案
好的,在这里找到了一些东西: http://tusksoft.com/blog/posts/6/clean-up-your-google-analytics-和帮助一站式引荐垃圾邮件与 - 这-简单重写规则 :
Ok, found something here: 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>
这篇关于如何在IIS上阻止Semalt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!