Blandede-artikler-1.jpg

404 sider

Kopier nedenståede kode til din error.php i din template

<?php

defined('_JEXEC') or die;

$url = JURI::root().'dit-alias-her';

if ($this->error->getCode() == '404')
{
header("HTTP/1.0 404 Not Found");

$html = '';

if (ini_get('allow_url_fopen'))
{
$html = @file_get_contents($url);
}
else if (function_exists('curl_version'))
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$html = @curl_exec($ch);
curl_close($ch);
}

if (empty($html))
{
$html = '<h1>404 - Page not found</h1>';
}

die($html);
}

?>

JUG Sorø is not affiliated with or endorsed by the Joomla!® Project or Open Source Matters. The Joomla!® name and logo is used under a limited license granted by Open Source Matters, the trademark holder in the United States and other countries. © 2016 JUG Sorø