菜单

Error 404 multilingual

2010年08月1日 - extensions

error_404_multilingual shows the defined error page of the given language if the requested page or file could not be found

Why this extension?

The Extension was build because the existing 404 handling extensions does not work fine on sites with more than one language.

The second reason is, that the other extensions make a redirect to the error page, that is not very intelligent because an search engine like google would not delete the page from index (its just moved…).

So the address bar URL is in fact changed too if you put www.foo.bar/asdf you will find yourself here: www.foo.bar/404.

To configure the extension, you have to use an array in localconf.php.

$TYPO3_CONF_VARS[‘EXTCONF’][‘error_404_multilingual’] = array(

‘_DEFAULT’ => array(

‘errorPage’ => ‘404’, # insert the SpeakingURL path segment of the error page here

‘redirects’ => array(

// ‘test.php’ => ‘/’, # Mapping for alternate 404 pages ‘old_url’ => ‘new_url’

),

‘mail’ => ‘example@test.com’

‘mailOnRedirect’ => false,

‘mailOn404’ => true,

),

# add multidomains to your config, you should have the same domains in your realUrl config

‘www.multidomain.com’ => array(

‘errorPage’ => ‘404_foo’,

‘redirects’ => array(),

‘mail’ => ‘example@test.com’

‘mailOnRedirect’ => true,

‘mailOn404’ => true,

),

);

For now, the extension works only with realURL, for this the language key have to be at first place of realURL.

The RealUrl config should look like this:

‘preVars’ => array(

array(

‘GETvar’ => ‘L’,

‘valueMap’ => array(

‘de’ => ‘0’,

‘en’ => ‘1’,

),

‘valueDefault’ => ‘de’,

‘noMatch’ => ‘bypass’,

),

),

发表评论

电子邮件地址不会被公开。 必填项已用*标注