Issue Bug Closed

#15341tslib_fe->pageNotFoundHandler do not send 404 code

old_hkdennis2k 12/31/05, 03:16 updated 08/12/06, 14:20

Description

by default,
TSFE do send a “Status: 404 Not Found“
But it will send http code 200(OK) to respnose in Apache httpd.

You may found some people said change the $TYPO3_CONF_VARS[‘FE’][‘pageNotFound_handling_statheader’] to “HTTP/1.0 404 Not Found”

But reference to php.net document(http://www.php.net/header),
it should be using
header ( string string [, bool replace [, int http_response_code]] ) since php 4.3.

It is available in PHP 4.3.0 and higher, and it is the minium requirement of typo3.

replace
header($header);
with
header($header, true, 404); // This is pageNotFoundHandler, it should be always 404.

(issue imported from #M2145)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.