Jump to content

How can I redirect traffic based on the visitor's country?


Recommended Posts

What I want to do is redirect traffic from certain countries to another web page.

 

More specifically, what I want to do is redirect all the traffic to a web page "X", EXCEPT traffic coming from countries ("A" | "B" | "C"), that will be redirected to another web page "Y".

 

Does anyone know where I can get step-by-step instructions on how to do this?

 

Any help would be appreciated. Finding a solution to this is really important for me right now!

 

Thanks in advance

Link to comment
Share on other sites

What I want to do is redirect traffic from certain countries to another web page.

 

More specifically, what I want to do is redirect all the traffic to a web page "X", EXCEPT traffic coming from countries ("A" | "B" | "C"), that will be redirected to another web page "Y".

 

Does anyone know where I can get step-by-step instructions on how to do this?

 

Any help would be appreciated. Finding a solution to this is really important for me right now!

 

Thanks in advance

 

I think it is only possible with an IP check

http://www.google.nl/webhp?q=php+country+redirect

Link to comment
Share on other sites

What I want to do is redirect traffic from certain countries to another web page.

 

More specifically, what I want to do is redirect all the traffic to a web page "X", EXCEPT traffic coming from countries ("A" | "B" | "C"), that will be redirected to another web page "Y".

 

Does anyone know where I can get step-by-step instructions on how to do this?

 

Any help would be appreciated. Finding a solution to this is really important for me right now!

 

Thanks in advance

 

 

maybe this?

{php}  
$lang = ($_SERVER['HTTP_ACCEPT_LANGUAGE']);  

if(ereg("pl", $lang)) {  
   header("location: http://google.pl");  
} else {  
   header("location: http://google.com");  
}  
{/php}

Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...