将所有错误重定向到404页面

问题描述 投票:0回答:1

如何强制TYPO3显示404页面而不是显示技术错误?

示例如果TYPO3无法解析给定的url属性我收到以下错误:

Oops, an error occurred!
Exception while property mapping at property path "": The identity 
property "dfgdfgdfgdfgdfgdfgdfg" is no UID.
More information regarding this error might be available online.

我已经尝试通过配置来解决它

$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'] = 
'USER_FUNCTION:.....';
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling'] = 
 'USER_FUNCTION:.....';

但这似乎对这些类型的错误没有任何影响。

typo3 typo3-8.x
1个回答
0
投票

你有没有试过这里

It will better if you set if from install tool

set this variable from install tool :pageUnavailable_handling

我希望这能帮到您!!

© www.soinside.com 2019 - 2024. All rights reserved.