RewriteEngine On RewriteCond %{REMOTE_ADDR} !^A\.B\.C\.D$ RewriteRule ^ https://domain.com/ [R]