A large number of my site visitors are coming to my homepage via links on three or four other sites. I want to redirect these visitors from my homepage to a subpage on my site. I’ve been looking for a script and found the one pasted below; however, I’m unsure how to use it. The developer’s instructions just said paste it into my code, but I have to assume that somewhere I have to identify the three referring sites that I want to redirect, and the subpage on my site I want to redirect to.
Can anyone help me better understand this script?
<!– ONE STEP TO INSTALL REFERRER REDIRECT:
1. Copy the coding into the HEAD of your HTML document –>
<!– STEP ONE: Paste this code into the HEAD of your HTML document –>
<HEAD>
<SCRIPT LANGUAGE=”JavaScript”>
<!– Original: Ronnie T. Moore, Editor –>
<!– Web Site: [url]http://javascriptsource.com
<!– This script and many more are available free online at –>
<!– The JavaScript Source!! [url]http://javascript.internet.com
<!– Begin
var refarray = new Array();
refarray[‘excite.com’] = “page.html?from=excite”;
refarray[‘yahoo.com’] = “page.html?from=yahoo”;
refarray[‘lycos.com’] = “page.html?from=lycos”;
refarray[‘infoseek.com’] = “page.html?from=infoseek”;
for (var i in refarray) {
if (document.referrer.indexOf(i) != -1) window.location.replace(refarray[i]);
}
// End –>
</script>
<p><center>
<font face=”arial, helvetica” size=”-2″>Free JavaScripts provided<br>
by <a href=”http://javascriptsource.com”>The JavaScript Source</a></font>
</center><p>
<!– Script Size: 0.84 KB –>