Azurel
Silver Pleskian
I want block a few bots and crawlers, which not respect robots.txt.
I think the best way is to create a new apache config-file in "/etc/httpd/conf.d/block_useragents.conf" and reload apache?
Content of block_useragents.conf:
Would this work for all vhosts? Is here a better way?
I think the best way is to create a new apache config-file in "/etc/httpd/conf.d/block_useragents.conf" and reload apache?
Content of block_useragents.conf:
<Directory "/var/www/vhosts/">
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^(Agent1|Agent2|Agent3) [NC]
RewriteRule .* - [F]
</Directory>
Would this work for all vhosts? Is here a better way?
Last edited: