note 35241 deleted from function.header by sniper
| From: | sniper@php.net | Date: | Sun, 07 Sep 2003 21:23:59 +0000 |
| Subject: | note 35241 deleted from function.header by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55591@lists.php.net to get a copy of this message | ||
Note Submitter: mail@cariad.co.za
----
I had problems with <?header('Location: newpage.php')?>, where (some) servers seemed
to simply send newpage.php without waiting for the client to request it (it acted more like
include() than a redirect).
So if I started a session on the login page, using cookies to propagate it, when it redirected back
to the site, the client wouldn't send the cookie, so wouldn't appear to be logged-in.
I solved this by adding <?header('Status: 302 Moved Temporarily')?> before the
redirect. That forces the client to make a new request.