S
S
sbh2015-09-09 06:39:30
Apache HTTP Server
sbh, 2015-09-09 06:39:30

How to deny access to certain user agents?

Actually I try like this:
SetEnvIfNoCase User-Agent "Mozilla/4.0 (Windows NT 6.1) AppleWebKit/535.31 (KHTML, like Gecko) Chrome/43.0.2554.85 Safari/535.31" bots
Order Allow,Deny
Allow from ALL
Deny from env=
bots works.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Chvalov, 2015-09-09
@Chvalov

Here is a generator for this case: incredibill.me/htaccess-block-user-agent
Something like this:

SetEnvIfNoCase User-Agent .*google.* search_robot
SetEnvIfNoCase User-Agent .*yahoo.* search_robot
SetEnvIfNoCase User-Agent .*bot.* search_robot
SetEnvIfNoCase User-Agent .*ask.* search_robot

Примерный полный список тут - http://eddnet.org/?p=1308

try it at the same time - support.hostgator.com/articles/specialized-help/te...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question