Basic stuff (as often the case not immediately findable). You want a simple script to redirect to a different page if te referrer is such and such. In the following example the two referral page options ( foo.html and bar.html ) are separated with the double pipe (the ‘or’ bit)…

<script type="text/javascript">
if (document.referrer == ("http://example.com/foo.html" || "http://example.com/bar.html")) 
      location.href = "foobar.html"; 
</script>

Last Updated on