note 44711 added to ref.http
| From: | madsen at lillesvin dot linux dot dk | Date: | Fri, 13 Aug 2004 23:44:06 +0000 |
| Subject: | note 44711 added to ref.http | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-74596@lists.php.net to get a copy of this message | ||
Instead of using META and/or JavaScript redirects, use the Location header, as it doesn't break
the browsers Back-button.
E.g.:
<?php
$redirectTo = "http://php.net";
header("Location: " . $redirectTo)
?>
It also supports relative URLs, even though I don't think they conform entirely to the HTTP/1.1
specification. But I've never experienced them not working.
header("Location: " . $redirectTo); sends a 301 response to the browser, which
_doesn't_ break the back button, unlike the META and/or JavaScript redirects does.
----
Manual Page -- http://www.php.net/manual/en/ref.http.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44711
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44711&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44711&report=yes
Search -- http://master.php.net/manage/user-notes.php