.htaccess - if from these IPs allow to URL1.com if not Deny and send to URL2.com

Discussion in 'Apache' started by mattjack, Feb 17, 2012.

  1. #1
    Hi Guys

    I have been trying to work out, with htaccess how to redirect all users from the USA to one urls and send all non-usa IPs to another URL.

    Can anyone help?

    Thanks in advance
     
    mattjack, Feb 17, 2012 IP
  2. BigTim3

    BigTim3 Guest

    Messages:
    266
    Likes Received:
    1
    Best Answers:
    2
    Trophy Points:
    0
    #2
    Options +FollowSymlinks RewriteEngine on RewriteCond %{REMOTE_HOST}!^123\.45\.67\.89 RewriteRule \.html$ /alternate_page.html [R=302,L]you can modifiy that as need but should give you idea
     
    BigTim3, Feb 17, 2012 IP