• # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine on
    # Redirect all except your IPs
    RewriteCond %{REMOTE_ADDR} !^108.180\.203\.130$
    RewriteCond %{REMOTE_ADDR} !^104.325\.645\.511$
    RewriteRule /index.php http://www.redirect-to-here.com/index.php [R=301,L]
    </IfModule>

    # END WordPress

    This is what I have in utf-8 .htaccess.. but
    Those are my IP address and only I should be able to view my construction site and rest of the people should be going to http://www.redirect-to-here.com

    right? but i just checked and everyone is still coming into my contruction site.

    what might the problem be ? could anyone type out the full code I can copy
    paste thanks so much T_T

Viewing 1 replies (of 1 total)
  • the $_SEVER var might be easier to work with than .htaccess, at least in my opinion

    at the top of functions.php, I’d put something similar to

    if ( !in_array($_SERVER['REMOTE_ADDR'], array("0.0...", "0.1...")) )
      wp_redirect('http://...');
Viewing 1 replies (of 1 total)
  • The topic ‘How to redirect everyone to different website except for my ips.’ is closed to new replies.