{"id":578,"date":"2016-03-31T05:30:07","date_gmt":"2016-03-31T05:30:07","guid":{"rendered":"https:\/\/www.sushilkumar.ind.in\/blog\/?p=578"},"modified":"2017-09-24T00:15:27","modified_gmt":"2017-09-24T00:15:27","slug":"how-to-secure-your-magento-admin-to-restrict-access-to-specific-ip-address-with-htaccess","status":"publish","type":"post","link":"https:\/\/www.sushilkumar.ind.in\/blog\/magento-2\/how-to-secure-your-magento-admin-to-restrict-access-to-specific-ip-address-with-htaccess\/","title":{"rendered":"How to Secure Your Magento Admin to Restrict Access to Specific IP Address with HTACCESS?"},"content":{"rendered":"[tblock anim=&#8221;pulse&#8221; tcuscolor=&#8221;#005eff&#8221; title=&#8221;How to Secure Your Magento Admin to Restrict Access to Specific IP Address with HTACCESS?&#8221; tag=&#8221;h1&#8243;\/]\n<p><strong>Copy the code and past in .htaccess file and change the ip with you.<\/strong><\/p>\n<pre>RewriteCond %{REQUEST_URI} ^\/(index.php\/)?admin\/ [NC]\r\nRewriteCond %{REMOTE_ADDR} !^196.196.196.196\r\nRewriteRule ^(.*)$ http:\/\/%{HTTP_HOST}\/ [R=302,L]\r\n<\/pre>\n<p><strong>Example:<\/strong><\/p>\n<pre>RewriteCond %{REQUEST_URI} ^\/(index.php\/)?youradminname\/ [NC]\r\nRewriteCond %{REMOTE_ADDR} !^ change here is your ip(196.196.196.196)\r\nRewriteRule ^(.*)$ http:\/\/%{HTTP_HOST}\/ [R=302,L]<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>[tblock anim=&#8221;pulse&#8221; tcuscolor=&#8221;#005eff&#8221; title=&#8221;How to Secure Your Magento Admin to Restrict Access to Specific IP Address with HTACCESS?&#8221; tag=&#8221;h1&#8243;\/] 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 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[363,20],"tags":[],"class_list":["post-578","post","type-post","status-publish","format-standard","","category-magento","category-magento-2"],"jetpack_publicize_connections":[],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p99pkJ-9k","_links":{"self":[{"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/posts\/578"}],"collection":[{"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/comments?post=578"}],"version-history":[{"count":0,"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/posts\/578\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/media?parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/categories?post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/tags?post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}