Issue Bug Closed

#16167pageNotFound_handling returns 301 instead of 404 as status code

Dmitry Dulepov 05/22/06, 14:48 updated 08/12/06, 14:15

Description

Problem: if $TYPO3_CONF_VARS[‘FE’][‘pageNotFound_handling’] is set to
absolute or relative URL, than
$TYPO3_CONF_VARS[‘FE’][‘pageNotFound_handling_statheader’] is ignored
and client is redirected to error page using code 302. This is
especially bad for search engines like Google because (1) they may not
remove such pages from their index (2) sitemaps do not work properly.

Solution: use t3lib_div::getURL() to fetch error page internally and
pass it to client with correct header. getURL() is extended to accept
custom HTTP headers that we need to send to 404 page (referrer and user
agent).

Patch was discussed in the “core” list and Martin Kutschker voted for it. So only one “+1” is missing. Patch is attached.

(issue imported from #M3532)

Reviews 0

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