+17 votes
404 views
asked in Linux by (15.2k points)

How can I ban malicious web bots with htaccess?

1 Answer

+0 votes
answered 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

...