Hi, I use the error.php with your implementation about the custom 404 error handling.
// custom 404 redirect
$config = JFactory::getConfig();
$sef = $config->get('sef');
$sef_rewrite = $config->get('sef_rewrite');
$sef_suffix = $config->get('sef_suffix');
$redirect_url = JURI::base();
if(!$sef_rewrite) {
$redirect_url .= 'index.php/';
}
$redirect_url .= 'foutpagina-404'; // menu alias
if($sef_suffix) {
$redirect_url .= '.html';
}
// if sef is turned off
if(!$sef) {
$redirect_url = 'index.php?option=com_sppagebuilder&view=page&id=38';
}
if (($this->error->getCode()) == '404') {
header('Location: ' . $redirect_url, true, 301);
exit;
}
In the default language works fine and redirects to 'foutpagina-404'.
In the other language also redirects to the same and does not respect the translation '/en/error-page-404'
Should I have a different redirection in the error.php file?