Re: Redirect to Home Page
| From: | Joshua Groboski | Date: | Mon, 28 Apr 2003 18:37:44 +0000 |
| Subject: | Re: Redirect to Home Page | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19696@lists.php.net to get a copy of this message | ||
You need to check the HTTP_REFERRER variable. It contains the entire URL of the page the user came from.
if ($_SERVER['HTTP_REFERRER'] != "http://yoursite.com/index.php")
header("Location: http://yoursite.com/index.php");
Try that.
Josh
Wade wrote:
03312003 1549 GMT-6 I saw this little script somewhere and now I cannot find it. Im working on this site. If you happen to bounce into the site from anywhere but the home page, you are automatically redirected back to the home page. Can someone help me with this? Wade