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?

[tblock anim=”pulse” tcuscolor=”#005eff” title=”How to Secure Your Magento Admin to Restrict Access to Specific IP Address with HTACCESS?” tag=”h1″/]

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

Schema Markup for eCommerce Websites

Each time someone searches a particular product online, they end up on a SERP that …

Leave a Reply

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