[TYPO3-dev] 404 error handling proposition from Ben and Dimitry

Dmitry Dulepov dmitry at typo3.org
Mon Oct 30 09:35:49 CET 2006


Peter Kraume wrote:
> Hi Ben and Dimitry,
> 
> I've read your article about 404 error handling with TYPO3 4.0.1
> (http://news.typo3.org/news/article/typo3-4-0-1-404/) but I have a
> problem now.
> 
> My site is set up with the single tree approach. I've configured RealURL
> to use valueDefault within the preVars. So my 404 page in the root of
> the page tree always get a country prefix.
> 
> When I set [FE][pageNotFound_handling] to /404/ now, it doesn't work
> since the language prefix is missing. How can I set up
> [FE][pageNotFound_handling] to use the individual translation for the
> 404 page?

if ($_GET['L'] == '1') {
	$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '/en/404/';
}
else if ($_GET['L'] == '2') {
	$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '/fr/404/';
}
else {
	$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '/de/404/';
}

-- 
Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)




More information about the TYPO3-dev mailing list