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 == ("" || "")) 
      location.href = "foobar.html"; 

Last updated on 5th September 2018