I am doing a 301 permanent redirect from an old server to a new server. When the new server’s page is hit I want to be able to determine whether the user comes from the old site and then react differently, i.e. instruct user to re-book mark the new page.
Any suggestions on how to determine if the referrer was a permanent redirect?
TIA
J
The browser typically handles this sort of thing, and most browsers do not pass on a referrer when coming from a 301 permanent redirect. The RFC standard does not specify whether or not referrer information should be passed, so you can’t expect that behavior.
If you are redirecting to the same primary domain, you can try a cookie value. You can also try redirecting with a special querystring, like
?from=oldsiteor something along those lines in order to solve this issue.