Redirecting Visitors from an IP Range to Another Site

Discussion in 'Site & Server Administration' started by Sleepy_Sentry, Jan 13, 2007.

  1. #1
    Is there any way I can redirect visitors from a specific IP range to a specific web address using the .htaccess file?
     
    Sleepy_Sentry, Jan 13, 2007 IP
  2. lkj

    lkj Peon

    Messages:
    729
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #2
    yes, you will need to write modrewrite and use %{REMOTE_ADDR} RewriteCond



    RewriteCond %{REMOTE_ADDR} 5.5.5.5
    RewriteRule !^newfile.php$ /newfile.php [R,L]
     
    lkj, Jan 16, 2007 IP