I'm trying to block web requests based on if they contain any of a group of strings. As far as I can tell between my own knowledge and searching online, what I have is correct. However, I'm still seeing these types of requests in the access logs.
Would access log entries still be created if the request was blocked in the Apache config? Or is what I have in my VHOST definition wrong?
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{HTTP_USER_AGENT} ^.*(icevikatam|AhrefsBot|spbot|MJ12|majestic12|Ahrefs).*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(Semrush|SISTRIX|80legs|HTTrack|Xenu|dataprovider).*$ [NC]
RewriteRule .* - [F,L]
My web server is Apache 2.4 for IBM i.