How it works?

Discussion in 'Apache' started by YacaZG, Jan 31, 2017.

  1. #1
    Hello,

    to stop bad bot, I added to htaccess

    # BLOCK USER AGENTS

    RewriteEngine on
    RewriteCond %{HTTP_USER_AGENT} Mozilla/5\.0\ \(Windows\ NT\ 6\.1;\ WOW64;\ rv\:40\.0\)\ Gecko/20100101\ Firefox/40\.1 [NC]
    RewriteRule !^robots\.txt$ - [F]


    # BLOCK BLANK USER AGENTS

    RewriteCond %{HTTP_USER_AGENT} ^-?$
    RewriteRule ^ - [F]

    Can anybody explain, how it works? Do it redirect bot to robots.txt?
    Thanks for answer
     
    YacaZG, Jan 31, 2017 IP