I’m trying to redirect users to another page, however, I need the Referer header to show that there was a redirection. In other words, if the user starts on SiteA, then goes to SiteB, which redirects to SiteC, I need the Referer header to show that the user came from SiteB when they arrive at SiteC.
Most browsers don’t change the Referer header when encountering a 3xx (301, 307, etc.) redirect code so I can’t use that. So I’m wondering what the best way is to accomplish what I need? I have HTML, PHP, and if necessary JavaScript at my disposal.
Thanks,
Harry
P.S. I’ve done enough HTML, PHP, and JavaScript coding to get by, just not enough to know the answer to this question.
Correct me if I’m wrong, but the 3xx status codes is to tell the browser that the page has move, and that they are to request the page again at the new url. So to a browser, the current page has not changed, and thus the referrer will remain he same.
Use a javascript like location=url during page load to redirect the page instead.