User:Patheticcockroach/404.php
From Wiki4Games
Here is the 404.php file we used to use. We don't need it anymore now that pretty URLs are properly configured!
<?php
header("HTTP/1.1 404 Not Found");
$query="";
if (isset($_SERVER['REDIRECT_QUERY_STRING']))$query='?'.str_replace("&","&",$_SERVER['REDIRECT_QUERY_STRING']);
header("Location: http://www.wiki4games.com/index.php?title=".substr($_SERVER["REDIRECT_URL"],1).$query);
echo '<meta http-equiv="refresh" content="1;url=http://www.wiki4games.com/index.php?title='.substr($_SERVER["REDIRECT_URL"],1).$query.'">';
echo 'This page doesn't exist.<br/>
<a href="http://www.wiki4games.com/index.php?title='.substr($_SERVER["REDIRECT_URL"],1).$query.'">Click here</a> if you are not automatically redirected.';
?>