Forum Moderators: phranque
RewriteRule ^robots\.txt - [L]
RewriteRule ^forbidden\.html - [L]
substituting the exact name and filepath of your custom 403 page. This goes before all access-control rules, overriding the usual “most severe - to - least severe” ordering.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP:Accept-Encoding} gzip
etc
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^.*(jorgee).* [NC]
RewriteRule ^(.*)$ - [L,R=403]
^.*(Jj)orgee.*
The (parentheses) are a mistake--in fact a mistake that would prevent the rule from executing as intended--because they mean "look for ‘Jjorgee’ and capture the ‘Jj’ part". [Jj]orgee
but, again, surely it's one or the other? It's quite rare for robots to change their casing. the Wordfence pluginI don't personally speak WordPress, and our resident WP expert is currently incommunicada, but have a closer look at the documentation for the plugin. Does it track requests or only successful requests?
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} [Jj]orgee
RewriteRule ^ - [F]
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} Jorgee
RewriteRule ^ - [F]
[edited by: phranque at 10:20 pm (utc) on Nov 24, 2017]