Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    It is possible to execute country-specific redirects. If you have GeoIP Apache API configured on your server, simply extrapolate the following:

    RewriteEngine on
    RewriteCond %{ENV:GEOIP_COUNTRY_CODE} SE [NC]
    RewriteRule ^$ http://sv.jonathanandsofia.com [L]

    This method employs country codes (Sweden — http://ftp.ics.uci.edu/pub/websoft/wwwstat/country-codes.txt — in the example).

    Of course, you could also redirect based on country-specific TLD or even IP addresses.

    Thread Starter jonathanmorgan

    (@jonathanmorgan)

    Thanks for your response!
    I actually ended up doing it using the Maxmind Geoip database instead.

    BoBoswell

    (@boboswell)

    jonathanmorgan,

    Could you give me a bit of info on how you ended up doing this with Maxmind? I’m trying to do this now and have hit a bit of a roadblock.

    Forgive my ignorance on this, but I have a redirect script that is actually working fine. I just need to know WHERE to put it so that visitors are redirected as soon as they hit my domain.

    Any info is appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘2 languages, 2 sites, how to GeoIP?’ is closed to new replies.