Home / Magento / How to Secure Your Magento Admin to Restrict Access to Specific IP Address with HTACCESS?

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

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

Copy the code and past in .htaccess file and change the ip with you.

RewriteCond %{REQUEST_URI} ^/(index.php/)?admin/ [NC]
RewriteCond %{REMOTE_ADDR} !^196.196.196.196
RewriteRule ^(.*)$ http://%{HTTP_HOST}/ [R=302,L]

Example:

RewriteCond %{REQUEST_URI} ^/(index.php/)?youradminname/ [NC]
RewriteCond %{REMOTE_ADDR} !^ change here is your ip(196.196.196.196)
RewriteRule ^(.*)$ http://%{HTTP_HOST}/ [R=302,L]

About Sushil_kumar

Check Also

How to keep your CMS blocks organized Form in Magento2

Head on over to Magento dashboard in your store and take a look at CMS …

Leave a Reply

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

0

March 1, 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:549) in /home/u797196687/public_html/wp-content/plugins/wppush-push-notifications/WPPush.php on line 274