Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 12th May 2010, 09:29 PM   #1
IM GENIUS
War Room Member
 
Freeman77's Avatar
 
Join Date: 2009
Location: Chicago
Posts: 522
Thanks: 17
Thanked 48 Times in 35 Posts
Default
Redirect script -- does this look right?
Share on: 
fb share twitter share gplus share more share

Below is a free geo redirect script that I found online and tried to modify for my own purposes (it had only 2 destinations, and I've added more).

However, I know NOTHING about programming. It seems to be working for US and Canada, but I don't see evidence of UK traffic being properly redirected.

I'm using this for promoting CPA offers, though below I've changed the destinations to Google addresses

Any suggestions would be greatly appreciated! Perhaps this will be instructive for others as well.

-------------------------


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


<script language="JavaScript">

var country= geoip_country_code();

if(country == "US")
{
<!--
window.location = "google.com"
//-->
}


if(country == "GB")
{
<!--
window.location = "google.com.uk"
//-->
}



if(country == "CA")
{
<!--
window.location = "google.ca"
//-->
}


else
{
<!--
window.location = "http://www.google.com"
//-->
}

</script>


Freeman77 is offline  
Unread 12th May 2010, 11:59 PM   #2
Active Warrior
 
l3vi501's Avatar
 
Join Date: 2010
Location: Northern Virginia
Posts: 50
Thanks: 3
Thanked 5 Times in 5 Posts
Default
Re: Redirect script -- does this look right?
Share on: 
fb share twitter share gplus share more share

It's fine, but your GB users could be coming out of Germanny, France on their geo ip. You should test it.

Save someones banana with SEOnky.com
l3vi501 is offline  
Closed Thread


Bookmarks

Tags
redirect, script


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 08:23 AM.