apache2.conf/.htaccess
SetEnvIfNoCase User-Agent "Yandex" bad_bots
SetEnvIfNoCase User-Agent "......" bad_bots
.....
<Directory /var/www/>
Options FollowSymLinks
AllowOverride None
<RequireAll>
Require all granted
Require not env bad_bots
</RequireAll>
</Directory>
images/.htaccess
Deny from all
<Files ~ "\.(jpe?g|png|gif)$">
Order deny,allow
Deny from env=bad_bots
</Files>