Dennis van der Heijden
posted this on November 08, 2009 19:37
For the redirect to work fast (before the page loads you need to place it in the head. We alway recommend to place a zone in the head, right under <head> so that for any reason in the future you do not need to add any more code to your site that you not already have,
make a new zone and past the code in the between <head> and </head>
Create a inventory item that says:
<HEAD>
<SCRIPT language="JavaScript">
<!--
window.location="http://someplace.com.mx";
//-->
</SCRIPT>
</HEAD>
You can make a segment is your going to use it more often, otherwise just make a action directly.
We want to redirect all Mexican users by default to our Mexican site. So we call the 'entity: country' and make sure it equals 'Mexico'. That way all visitors from Mexico are not going to http://someplace.com but to http://someplace.com.mx.
We recommend to do this only once per session, some visitors really want your US site.