I am a Canadian Company. I have my main website with all products in US$ but then using this redirect, any traffic from Canada is redirecting to a my other mirrored website where all of the products are priced in CND$.
This is the script I am using in the HEAD of my pages of the US site with Maxmind GeoIP Lite. It works perfectly.
<script language="JavaScript" src="http://j.maxmind.com/app/country.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">// <![CDATA[
if(geoip_country_code() == "CA"){
document.write("");
window.location = 'http://www.myCanadaianWebsite.com';
}
// ]]></script>
The only problem or annoying thing is that i have a hard time checking and testing the US site out myself since I am located in Canada. I am having to delete the script from my US webpage every time i want to check my US site. Then I re-paste it back in when i am done looking.
Is there a way that I can add an exception to my script that will not redirect me based on my IP or location? I have googled it and haven't come across anything like that. Would love to find a solution to this problem. Thanks.