[solved] Ban bots how?

Discussion in 'General' started by dopelherz, Jun 8, 2013.

  1. dopelherz

    dopelherz New Member

    Hi guys!
    1) Could you please tell me how to ban bots with litespeed?
    I tried this, but it is not working. Could you tell me what is wrong?
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} ^Linguee [OR]
    RewriteCond %{HTTP_USER_AGENT} ^MJ12bot [OR]
    RewriteCond %{HTTP_USER_AGENT} ^AhrefsBot [OR]
    RewriteCond %{HTTP_USER_AGENT} ^Ezooms [OR]
    RewriteCond %{HTTP_USER_AGENT} ^AcoonBot [OR]
    RewriteCond %{HTTP_USER_AGENT} ^SISTRIX [OR]
    RewriteCond %{HTTP_USER_AGENT} ^NextGenSearchBot [OR]
    RewriteCond %{HTTP_USER_AGENT} ^80legs [OR]
    RewriteCond %{HTTP_USER_AGENT} ^Sogou [OR]
    RewriteCond %{HTTP_USER_AGENT} ^ZmEu [OR]
    RewriteCond %{HTTP_USER_AGENT} ^360Spider
    RewriteRule .* - [F,L]

    2) Also, I want no LiteSpeed sign on all the default error pages.
    In Apache there was such an option to make it silent. Is it possible with LiteSpeed?

    Thank you!
    Last edited by a moderator: Jun 9, 2013
  2. NiteWave

    NiteWave Administrator

    try:
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} Linguee [OR]
    RewriteCond %{HTTP_USER_AGENT} MJ12bot [OR]
    RewriteCond %{HTTP_USER_AGENT} AhrefsBot [OR]
    RewriteCond %{HTTP_USER_AGENT} Ezooms [OR]
    RewriteCond %{HTTP_USER_AGENT} AcoonBot [OR]
    RewriteCond %{HTTP_USER_AGENT} SISTRIX [OR]
    RewriteCond %{HTTP_USER_AGENT} NextGenSearchBot [OR]
    RewriteCond %{HTTP_USER_AGENT} 80legs [OR]
    RewriteCond %{HTTP_USER_AGENT} Sogou [OR]
    RewriteCond %{HTTP_USER_AGENT} ZmEu [OR]
    RewriteCond %{HTTP_USER_AGENT} 360Spider
    RewriteRule .* - [F,L]

    or
    RewriteCond %{HTTP_USER_AGENT} Linguee|MJ12bot|AhrefsBot [OR]
    ...
    RewriteCond %{HTTP_USER_AGENT} Sogou | ZmEu | 360Spider
    RewriteRule .* - [F,L]


    it looks apache don't have, I have tested and replied in other thread.
    if you mean
    ErrorDocument directive, litespeed also supoort it.

    regardless, from 4.2.3, please read
    http://blog.litespeedtech.com/2013/05/22/4-2-3-is-here/
    "Hide the LiteSpeed error page signature"
    it's there.
  3. dopelherz

    dopelherz New Member

    Thank you very much.

Share This Page