【问题标题】:How to block a referrer's full URL and not only the domain如何阻止引用者的完整 URL 而不仅仅是域
【发布时间】:2015-03-26 17:15:01
【问题描述】:

slowhttptest 受到 DDoS 攻击。我的access.log 文件中的所有条目的引用 URL 为http://code.google.com/p/slowhttptest/。我想设置我的 .htaccess 以阻止使用该 URL 作为其 HTTP_REFERER 的访问者。我能找到的一切都是如何阻止整个域,但我想阻止这个特定的 URL。下面的代码是为了阻止一个域,但它可以与 RewriteCond 中的code\.google\.com/p/slowhttptest 一起使用吗?

RewriteCond %{HTTP_REFERER} example\.com [NC]
RewriteRule .* - [F]

【问题讨论】:

    标签: apache .htaccess


    【解决方案1】:

    只需将example\.com 替换为/p/slowhttptest/

    RewriteCond %{HTTP_REFERER} /p/slowhttptest/ [NC]
    RewriteRule .* - [F]
    

    【讨论】:

      猜你喜欢
      • 2011-10-31
      • 1970-01-01
      • 2019-08-17
      • 2017-10-14
      • 2013-09-15
      • 1970-01-01
      • 2013-01-09
      • 1970-01-01
      相关资源
      最近更新 更多