Lock down WordPress admin login with .htaccess

Please only post Search Engine and Webmaster Related stuff.
Post Reply
scrapcar
Posts: 12
Joined: Sun Jan 15, 2012 8:18 am
Location: London
Contact:

Lock down WordPress admin login with .htaccess

Post 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.

JohnSn01
Posts: 49
Joined: Mon Jun 20, 2016 11:45 pm
Contact:

Re: Lock down WordPress admin login with .htaccess

Post 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests