For SEO I need personalised error404 pages for all languages in my multilingual site. I have added the following code to error.php in the template map:
$lang = JFactory::getLanguage();
$result = $lang->getTag();
if (($this->error->getCode()) == '404') {
if ($result=="nl-NL") {
header('Location: /index.php?option=com_content&view=article&id=3415');
exit;
}
if ($result=="en-GB") {
header('Location: /index.php?option=com_content&view=article&id=3415');
exit;
}
However only the default language gives the right result. Please tell me what to change