note 47036 added to function.header

From: Date: Sun, 31 Oct 2004 20:57:30 +0000
Subject: note 47036 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-79416@lists.php.net to get a copy of this message
> marcelo at redcetus dot com at 2004-10-15 05:01 wrote: > Redirect the POST like this: > header("HTTP/1.0 307 Temporary redirect"); > header("Location: > https://myserver.redcetus.com/otherlocation"); But that seems to cause a long pause followed by a blank page. On checking, I found that the temporary redirect code for 1.0 was 302 and for 1.1 it was 307, but those made no difference. Others suggested the following sequence session_write_close(); header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/" . "nextpage.php"); exit; [or exit();] but in either case, the $_SESSION variables set just prior to this are still getting lost. ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47036 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47036&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47036&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47036&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47036&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47036&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47036&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47036&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79416) next »