Restrict access to Magento admin based on IP

by c

Add this to .htaccess after “RewriteBase /”:

# Restrict admin access

RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123

RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123

RewriteCond %{REQUEST_URI} admin [NC]

RewriteRule ^(.*)$ / [F,L]