Deny Access to files Custom Code/Login Security has no effect
-
Hi,
I’m trying to use my htaccess to limit IPs access to sensitive parts of the site – namely, /wp-admin/ and wp-login.php.
However, despite my using what is supposedly the correct code in my htaccess, it’s simply not working. ANY IP can still access my wp-admin, I’ve confirmed this via multiple proxies (and, given the issue I describe, it’s obvious). This is a big issue because I’m getting around 100 login attempts per hour, from all manner of IPs. I can block them individually, but it’s time consuming and somewhat pointless as the person just has a new batch of IP addresses the next hour.
This is what I have in my root htaccess:
RewriteCond %{REQUEST_URI} ^(/wp-login\.php|.*wp-login\.php.*)$
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{THE_REQUEST} HTTP/1\.0$ [OR]
RewriteCond %{SERVER_PROTOCOL} HTTP/1\.0$
RewriteRule ^(.*)$ – [F,L]<FilesMatch “^(wp-config\.php|php\.ini|php5\.ini|readme\.html|bb-config\.php|wp-login\.php)”>
Order allow,deny
Deny from all
#Allow from (my IP)
</FilesMatch>And in my wp-admin htaccess:
<FilesMatch “^(install\.php|wp-login\.php|index\.php|admin\.php)”>
Order Allow,Deny
Deny from all
#Allow from (my IP)
</FilesMatch>Also note that despite my attempting to enable BPS’ login security, it doesn’t seem to have any effect. I’m not getting the alert emails (I have Wordfence active as well and it’s sending me the failed login attempt emails) and it’s still displaying the reset password link despite my choosing the option to hide it. In fact, when I look at the login security database, it has recorded 0 login attempts.
Please help me figure out why NOTHING is working as it’s supposed to. This person is persistent and I have literally hundreds of IPs locked out at the moment and he shows no signs of stopping. Getting the IP denial code to actually work should put a stop to this, but I can’t find any reason why it’s not doing what it’s supposed to when I google.
- The topic ‘Deny Access to files Custom Code/Login Security has no effect’ is closed to new replies.