<?

$domain 
'mikepiontek.com';

function 
getPathFromRequest $path ) {
    
$path explode('/',urldecode($path));
    
$path array_slice($path,0,count($path)-1);
    
$path implode('/',$path);
    return 
$path;
}

$path getPathFromRequest($_SERVER['REQUEST_URI']);
$paths = array();

do {
    if (
file_exists($_SERVER['DOCUMENT_ROOT'].$path)) {
        
array_push($paths,'<a href="'.$path.'/">'.$domain.$path.'</a>');
    }
    
$path getPathFromRequest($path);
} while (
$path && count($paths) < 5);
$pathcount count($paths);
$paths implode('<br />',$paths);

if (
$pathcount 1) {
    
$paths "You might find what you're looking for through one of the 
        following pages:</p><p>"
.$paths."</p><p>Otherwise just choose";
} else if (
$pathcount == 1) {
    
$paths "You might find what you're looking for through the 
        following page:</p><p>"
.$paths."</p><p>Otherwise just choose";
} else 
$paths 'Choose';

?>

<h3>404 Not Found</h3>

<p>You have arrived here in error, or the page you were looking for is no 
longer here. This site has been recently designed, so it may have just moved 
to a new location. <?=$paths?> one of the sections at left to browse through 
my site.</p>