how on earth do i geo redirect

Xyon81

Regular Member
Joined
May 27, 2009
Messages
224
Reaction score
18
another noob thread, but i can't seem to find the answer on here, and google seems to only come up with options i have to pay for.

Basically i just want to direct my UK traffic to a subdomain, is there a simple + free way to do this?
 
Here is my simple geo redirect page that I have coded myself using the free Maxmind API. Write this as an html file in the landing page, so that all the UK traffic get redirected to your subdomain address.

Code:
<script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script>


<script language="JavaScript">

var country= geoip_country_code();

if(country  == "GB")      
{
<!--
window.location = "YOUR SUBDOMAIN ADDRESS"
//-->
}
</script>

THANK ME IF U LOVE THE CODE
 
Back
Top