Mah....

codice:
$file = __DIR__ . $_SERVER['REQUEST_URI'] . '.php';

if (file_exists($file)) {
    include($file);
} else {
    header('HTTP/1.0 404 Not Found');
    die('Page not found');
}