aeafisme23 Posted May 8, 2006 Share Posted May 8, 2006 Description: Im at yahoo.com, i type in mydomain.com in address bar. i want the user to be redirected to their last current page they were on (yahoo.com). Im doing this so they have to go through my site to that certain page rather than type the exact url into addressbar.Here is what i got so far:[code] /* Error Checking, if state or city does not exist, then go back to Original URL ... so if you came from Yahoo, go back to Yahoo */if ($state == "" || $city =="") {$URL=$referrer;header ("Location: $URL");}/* Error Checking, if here then just do that simple echo more programming would be inserted with includes and what not /* RICHMOND, VIRGINIA: WTVR AND MATTRESS WAREHOUSE*/elseif ($state == "VA" && $city =="Richmond-Petersburg"){echo "hi ur from Virginia, Richmond area";}/* Error Checking, this is an else just because who knows what might happen , but hey lets send them back to Yahoo if thats where they came from else {$URL=$referrer;header ("Location: $URL");}?> [/code]Everything works except for the fact that it redirects back to the [a href=\"http://www.domain.org/\" target=\"_blank\"]http://www.domain.org/[/a]video/INDEX.PHP not back to say AMAZON or ebay wherever a person is entering the link from. Any ideas? Thanks guys Quote Link to comment Share on other sites More sharing options...
aeafisme23 Posted May 9, 2006 Author Share Posted May 9, 2006 Simplified Version: Im at yahoo.com, i type in mydomain.com in address bar. i want the user to be redirected to their last current page they were on (yahoo.com). Im doing this so they have to go through my site to that certain page rather than type the exact url into addressbar. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.