Index: typo3/sysext/cms/tslib/class.tslib_fe.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_fe.php (revision 8192) +++ typo3/sysext/cms/tslib/class.tslib_fe.php (working copy) @@ -973,13 +973,19 @@ $GLOBALS['TT']->pull(); if ($this->pageNotFound && $this->TYPO3_CONF_VARS['FE']['pageNotFound_handling']) { + $header = t3lib_utility_Http::HTTP_STATUS_404; $pNotFoundMsg = array( 1 => 'ID was not an accessible page', 2 => 'Subsection was found and not accessible', 3 => 'ID was outside the domain', 4 => 'The requested page alias does not exist' ); - $this->pageNotFoundAndExit($pNotFoundMsg[$this->pageNotFound]); + + if ($this->pageNotFound === 1 || $this->pageNotFound === 2) { + $header = t3lib_utility_Http::HTTP_STATUS_401; + } + + $this->pageNotFoundAndExit($pNotFoundMsg[$this->pageNotFound], $header); } // set no_cache if set