Home / Woo-Commerce / How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?

How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?

How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?

 

Copy and paste the code in .htaccess file.

ErrorDocument 401 /path-to-your-site/index.php?error=404
ErrorDocument 403 /path-to-your-site/index.php?error=404

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

About Sushil_kumar

Check Also

All In One Slider v3.6 – Responsive WordPress Slider Plugin

Demo: https://codecanyon.net/item/all-in-one-slider-responsive-wordpress-slider-plugin/1903226 Last Update 2 March 17 Created 17 March 12 Compatible Browsers IE7, IE8, …

Leave a Reply

Your email address will not be published. Required fields are marked *

4

March 29, 2017

Clear all

Warning: Cannot modify header information - headers already sent by (output started at /home/u797196687/public_html/wp-content/themes/sushil/framework/functions/common-scripts.php:634) in /home/u797196687/public_html/wp-content/plugins/wppush-push-notifications/WPPush.php on line 274