Re: Re: Redirect to Home Page
| From: | Ignatius Reilly | Date: | Mon, 28 Apr 2003 18:43:36 +0000 |
| Subject: | Re: Re: Redirect to Home Page | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19697@lists.php.net to get a copy of this message | ||
Beware!
'HTTP_REFERRER' actually spells 'HTTP_REFERER', just like in the HTTP spec
Ignatius
____________________________________________
----- Original Message -----
From: "Joshua Groboski" <joshua.groboski@savvis.net>
To: <php-windows@lists.php.net>; "Wade" <wade@wadesmart.com>
Sent: Monday, April 28, 2003 8:37 PM
Subject: [PHP-WIN] Re: Redirect to Home Page
> 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
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>