<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var refarray = new Array();
refarray['domain1.com'] = "http://www.able2know.com/pagefordomain1.htm";
refarray['domain2.com'] = "http://www.able2know.com/pagefordomain2.htm";
refarray['domain3.com'] = "http://www.able2know.com/pagefordomain3.htm";
for (var i in refarray) {
if (document.referrer.indexOf(i) != -1) window.location.replace(refarray[i]);
}
// End -->
</script>
Код:
<script language="JavaScript"><!--
var who = document.referrer;
if (who.indexOf('www.domain1.com') != -1)
window.location.href = 'http://www.domain1.com/domain1/';
if (who.indexOf('www.domain2.com') != -1)
window.location.href = 'http://www.domain2.com/domain2/';
else
alert('Where DID you come from?');
//--></script>