In this article we explain how you can redirect all web traffic to another website but still be able to access the website from your IP.

Steps to Redirect All Traffic but Exclude Your IP

  1. Edit your .htaccess file
  2. Add the following code to the top of the file.
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REMOTE_HOST} !^10.0.1.1
    RewriteRule .* https://www.example.com [R=302,L]
  3. Change 10.0.1.1 to your public broadband IP address.
  4. Change https://www.example.com to the website url you want to redirect your web traffic to.
  5. Save your .htaccess file changes.

Note; the redirect will take effect immediately