freegeoip

Redirect main website to sub domain based on visitor IP address (country)

↘锁芯ラ 提交于 2019-12-11 02:07:35
问题 I need help redirecting my website to sub domain based on visitor ip address (location). I have 3 specific websites I want to redirect visitors from Europe to eu.mysite.com I want to redirect visitors from USA to us.mysite.com I want to redirect visitors from rest of the world to mysite.com I tried several codes and modifying htaccess as well, it didn't help as GeoIp not installed on the server. 回答1: You just use an API to resolve the visitor continent by IP and redirect to the corresponding

freegeoip doesn't work anymore

别说谁变了你拦得住时间么 提交于 2019-12-08 06:47:57
问题 A few months ago I created a code that detect a visitor country and display the legal drinking age. For country in EU is 18 and for other countries is 21. I'm using the freegeoip. The code was working great, but now I noticed that doesn't work anymore. $.get("http://freegeoip.net/json/", function (response) { $("#ip").html("IP: " + response.ip); $("#country_code").html(response.country_code); if(response.country_code=='AL','AD','AT','BY','BE','BA','BG','HR','CY','CZ','DK','EE','FO','FI','FR',

freegeoip doesn't work anymore

…衆ロ難τιáo~ 提交于 2019-12-07 20:36:30
A few months ago I created a code that detect a visitor country and display the legal drinking age. For country in EU is 18 and for other countries is 21. I'm using the freegeoip. The code was working great, but now I noticed that doesn't work anymore. $.get("http://freegeoip.net/json/", function (response) { $("#ip").html("IP: " + response.ip); $("#country_code").html(response.country_code); if(response.country_code=='AL','AD','AT','BY','BE','BA','BG','HR','CY','CZ','DK','EE','FO','FI','FR','DE','GI','GR','HU','IS','IE','IT','LV','LI','LT','LU','MK','MT','MD','MC','NL','NO','PL','PT','RO','RU