[TYPO3-dev] Problem with pageNotFound_handling and type
Steffen Kamper
info at sk-typo3.de
Wed Sep 3 14:44:28 CEST 2008
Steffen Kamper schrieb:
> Hi,
>
> i have a problem. I configured pageNotFound_handling which works ok almost.
>
> But some urls are disinterpreted, like
> /index.php/news/23/57/
>
> Then instead of 404-page i get TYPO3-error: The page is not configured!
> [type= 57][]
>
> How can i prevent this without defining all types? :-)
>
> vg Steffen
ok, after digging into the code i found a way.
I defined:
$TYPO3_CONF_VARS['FE']['pageUnavailable_handling'] = 'REDIRECT:/404.html';
Because i didn't want to write own user_func i patched tslib_fe in this way:
} elseif (t3lib_div::isFirstPartOfStr($code,'REDIRECT:')) {
$redirect = explode(':', $code);
$replace = intval($code[2]) ? true : false;
$http_response_code = $code[3] ? $code[3] : '404';
header('Location: '.t3lib_div::locationHeaderUrl($code[1]),
$replace, $http_response_code);
exit;
So it is possible to declare ohn http_response_code for the redirect.
What do you think of that?
btw - i remember Jeff enhanced these handlers, are they documented in
actual docs?
vg Steffen
More information about the TYPO3-dev
mailing list