Home
/
Website Help
/
Other
/
How to redirect all visitors except your IP to another website?

How to redirect all visitors except your IP to another website?

To redirect everyone but you to another website, add this code your website’s .htaccess file:

RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^1.2.3.4
RewriteRule .* http://www.anothersite.com [R=302,L]

Replace 1.2.3.4 with your IP Address and anothersite.com with the actual domain name.

Share This Article