Page 1 of 1

Lock down WordPress admin login with .htaccess

Posted: Thu Feb 25, 2016 4:31 am
by scrapcar
Hi all, I having been trying to limit my admin area using .htcccess the issue i have have it that it doesn't seem to work fully.
This is the code i'm using.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^ip\.ip\.ip\.ip$
RewriteRule ^(.*)$ - [R=403,L]
</IfModule>

I have placed it in my .htaccess, when i test it, it appears to work if i don't include my Ip range it blocks access. Great!
However i'm still getting attacks which i can't understand, is the code wrong or in the wrong folder does anyone have any idea what i can do, or is this not a bullet proof method. any help much appreciated. Hope i have given enough information.

Re: Lock down WordPress admin login with .htaccess

Posted: Sun Jun 26, 2016 10:23 pm
by JohnSn01
Wordpress is a quality CMS that can be of great use to develop websites from scratch. With a large community backing it, wordpress is the best tool out there for new bloggers and webmasters.