Страница ошибки 404
Создаем страницу ошибки, лучше в xmap.
Создаем пункт меню со ссылкой на страницу ошибки. Назначаем ему алиас, например "error-404"
Редактируем файл шаблона error.php
<?php
defined('_JEXEC') or die;
echo file_get_contents(JURI::root().'error-404.html');
Если настройки сервера не позволяют использовать функцию file_get_contents , то можно использовать curl
<?php
defined('_JEXEC') or die;
function file_get_contents_($url)
{
if (!function_exists('file_get_contents') || !is_callable('file_get_contents'))
{
$http = JHttpFactory::getHttp();
$response = $http->get($url);dump($response,'$response');
$data = &$response->body;
}
else
{
$data = file_get_contents($url);
}
return $data;
}
$url = JURI::root().'error-404.html';dump($url,'$url');
echo file_get_contents_($url);
или редирект.
<?php
defined('_JEXEC') or die;
?>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
document.location.href = "<?php echo JURI::root().'error-404.html'; ?>";
</script>
</head>
</html>