note 81584 added to function.header

From: Date: Tue, 04 Mar 2008 22:17:50 +0000
Subject: note 81584 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-136748@lists.php.net to get a copy of this message
Below there is a simple way to get the 'impossible' - redirect with 404 code. Simple combinations with header("Location: /", false, 404") has no influence on the real redirect statement (the website isn't redirected, but you get proper 404 HTTP status message). To get proper redirect with 404 status code you should use header("Refresh: 0; url=/", false, 404) - even with 0 seconds redirect as above. ---- Server IP: 194.153.94.10 Probable Submitter: 82.145.83.183 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/81584 Del: integrated -- https://master.php.net/note/delete/81584/integrated Del: useless -- https://master.php.net/note/delete/81584/useless Del: bad code -- https://master.php.net/note/delete/81584/bad+code Del: spam -- https://master.php.net/note/delete/81584/spam Del: non-english -- https://master.php.net/note/delete/81584/non-english Del: in docs -- https://master.php.net/note/delete/81584/in+docs Del: other reasons-- https://master.php.net/note/delete/81584 Reject -- https://master.php.net/note/reject/81584 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136748) next »