note 26034 added to function.header
| From: | jsheets at shadotech dot com | Date: | Tue, 15 Oct 2002 19:12:43 +0000 |
| Subject: | note 26034 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38128@lists.php.net to get a copy of this message | ||
For those of you who want to change a 404 (or other error) to a 200 OK status this is how to do it.
header("status: 200") or header("http/1.0 200 Ok") depending on your
configuration (my Apache required the second one).
The reason I needed to change the 404 to a 200 was I was doing intra site redirection and catching
the 404 error so that I could display the appropiate file, with IE with friendly http error messages
on (the default) IE displays its own 404 page and not yours so I changed the status to 200 OK and
all is well.
--
http://www.php.net/manual/en/function.header.php
http://master.php.net/manage/user-notes.php?action=edit+26034
http://master.php.net/manage/user-notes.php?action=delete+26034
http://master.php.net/manage/user-notes.php?action=reject+26034