Page Redirect according to Different countries - Cyber Tweaks

Ads Top

Page Redirect according to Different countries

Content is free. When you buy through links on my site, I may earn affiliate commission. Learn More.

Page redirect to Different countries

Here is a script to redirect the user based on their countries. It will redirect a user directly by checking his/her IP to the page which you located for his/her country.

Code:


<script src='http://www.geoplugin.net/javascript.gp' type='text/javascript'></script>
<script type='text/javascript'>
switch(geoplugin_countryCode()){
case "US" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "IN" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "PH" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "ID" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "MY" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "GB" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "DE" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "IT" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "CA" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "FR" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "MX" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "AU" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "JP" :
document.location.href = "http://www.cybertweaks.com/";
break;
case "ES" :
document.location.href = "http://www.cybertweaks.com/";
break;
}
</script>

Paste code just above <head>

No comments:

Powered by Blogger.