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

Dmitry Dulepov dmitry at typo3.org
Mon Oct 30 10:14:22 CET 2006


Hi!

Peter Kraume wrote:
> Dmitry Dulepov wrote:
>> 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/';
>> }
>>
> thx for your hint, but where should I insert this snippet?
> I tried to put it into /typo3conf/localconf.php but it doesn't work
> since there is no L GET var present at the time when localconf.php is
> parsed.

Well, if you use realurl, you can check URI with preg_match. Something 
like preg_match('/^\/en\//', $_SERVER["REQUEST_URI"]);

-- 
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