Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By MastaP on
Hi,
I am looking for a solution to redirect users based on their IP on the home page. Based on COUNTRY-REGION
So if a used is from France or CanadaQuebec(French province in Canada), they get redirected to domain.com/fr, else they get directed to domain.com/fr
What is the simplest way to do this?
please note that this is REGION level, not just country-level
thanks!
Comments
Unless you really want to
Unless you really want to annoy visitors, it might be better to have a prominent flag-based language switcher on your site. I live abroad and hate it when I go to an English site and get redirected to the German version, just because I'm in Germany.
That said, there are some modules which might help.
This one is only in dev for D7:
http://drupal.org/project/ip2locale
This might also help (I saw reference to a redirect method that depends on it)
http://drupal.org/project/smart_ip
See you at the Drupalcon!