Forum Moderators: phranque
How should I go about redirecting traffic if it comes from page a.html and redirecting traffic to another page if it comes from page b.html? (Redirection based on referrer)
Hope this makes sense, and I hope even more that someone can help me. Thanks,
Jay
What scripting languages are available to you? Any preferences?
It shouldn't be too difficult. You just need to make some kind of redirection script that knows where to send them based on where they came from.
Other than that you could also create a little script that writes the proper url into the page based on what page they are on.
Either solution wouldn't be overly difficult though it depends on what scripting language you have and if you are at all familiar with it. ;)
<SCRIPT LANGUAGE="JavaScript">
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>