This is a script I used to redirect visits from a certain site to a specific page.
I then used a meta refresh tag to direct them back to the referring site but this can be used simply to display a custom page based on where the visitor was referred from.
domain1.com
Code:<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>
Replace each domain in the array to the ones you want to add as refferers and specify the page to use as a redirect using the URL format shown above.