+22 votes
487 views
in Linux by (26.3k points)
How can I ban malicious web bots with htaccess?

1 Answer

+15 votes
by (1.2k points)
selected by
 
Best answer
You should add this top of your htaccess file:
 
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^evilbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^spambot [OR]
RewriteCond %{HTTP_USER_AGENT} ^virusbot
RewriteRule ^(.*)$ http://no.access/
 
This prevents malicious bot
Ask a Question
Welcome to WikiTechSolutions where you can ask questions and receive answers from other members of the community.

You can ask a question without registration.

Categories

...