redirect based on the country where visitor is located
Here is what I am trying to achieve:
When the server detects that a visitor comes from a certain country, it redirects him to some other website instead of my site.
I tested the two modules: IP to Country and IP to Locale. Unfortunately it only redirects to a certain language version of my drupal site. I am not able to put an URL to be redirected to. Also I don't want to set up a new language version for my website.
Now I plan to put my own code. Here is what I am trying to do:
1) download IP-to-Country Database and put it on my server
2) add some code to my drupal website to read the database, map the ip address with the country, and redirect when it is a certain country
I am pretty sure what to put for the code since I have done the same thing for my oscommerce sites. But I don't know where the code should be placed.
Should it be in page.tpl.php of my theme?
Thanks for the help.
