´ja jeg har læst det...
jeg har en fil ved navn: .htaccess liggende i min htdocs bibliotek indeholdende:
ErrorDocument 404 /404.php
og 404.php indeholder:
<html>
<head>
<title>Page not found</title>
<meta name="robots" value="none">
</head>
<body>
<h1>Siden blev ikke fundet</h1>
<?PHP
// define logfile:
// $logfile = $DOCUMENT_ROOT . "/404log.php";
$logfile = '';
// check that this is running as Apache module
if (!function_exists('virtual')) {
echo "<h1>Error, not running as Apache module</h1>";}
// get name of the requested page
$request = rawurldecode($REQUEST_URI);
if(get_cfg_var('magic_quotes_gpc')) $request = stripslashes($request);
// check that this is not called directly
if ($request == $PHP_SELF) {
echo "This page should not be called directly";
exit;}
$req = htmlspecialchars ($request);
// Output text:
echo "<p>Desværre, siden <b>$req</b> eksisterer ikke på denne server!</p>\n";
echo "<p>Måske vil disse links hjælpe dig med at finde det du leder efter:</p>\n<ul>\n";
// write to logfile:
if ($logfile) {
$handle = fopen($logfile,'a');
if ($handle) {
$reflink = "<a href='$HTTP_REFERER'>$HTTP_REFERER</a>";
$dat = date('Y-m-d');
fwrite($handle,"<tr><td>$req</td><td>$reflink</td><td>$dat</td></tr>\n");
fclose($handle);}}
// output a lot of spaces to make sure Microsoft Internet Explorer 5.x doesn't
// display it's own "friendly" error page:
printf('%512s', ' ');
// You may add links to home, index, and search pages below:
?>
<li><a href="
http://www.rolator.dk/">Tilbage til forsiden</a></li>
<li><a href="java script:history.go(-1)">Tilbage</a></li>
</ul>
</body>
</html>
Hvad skal jeg ellers gøre ???