I have a few pages that set cookie with page ID. I need to be able to load appropriate page for users that have this page cookie. I only want to do it for users that arrive to my site from elsewhere, i.e. referrer is not some page under my domain.
What's the best way to do this?
Shall I check and if cookie exists do META tag redirect to that page?
if ($_COOKIE["pageID"] != '' && ???REFERRER ....) {
echo '
<META
http-equiv="refresh" content="0;
URL=http://www.mydomain.com/pageID= '.$_COOKIE["pageID"] .'">';
}
Something similar to how Craigslist.com opens their locations.