"downloads", "documentation" => "docs", "mailinglists" => "mailing-lists", "mailinglist" => "mailing-lists", "changelog" => "ChangeLog-4", "gethelp" => "support", "help" => "support", "unsubscribe" => "unsub", "subscribe" => "mailing-lists", "logos" => "download-logos", "README.mirror" => "mirroring", // backward compatibility # manual shortcuts "ini" => "configuration", "install" => "installation", "intro" => "introduction", "whatis" => "introduction", "whatisphp" => "introduction", "what_is_php" => "introduction", "windows" => "install.windows", "win32" => "install.windows", "globals" => "language.variables.predefined", "register_globals" => "security.registerglobals", "registerglobals" => "security.registerglobals", "gd" => "image", "tut" => "tutorial", "tut.php" => "tutorial", // for backward compatibility with PHP page! "faq.php" => "faq", // for backward compatibility with PHP page! "bugs.php" => "bugs", // for backward compatibility with PHP page! "bugstats.php" => "bugstats", // for backward compatibility with PHP page! "icap" => "mcal", // mcal is the successor of icap # external shortcut aliases ;) "dochowto" => "phpdochowto", "projects.php" => "projects", // for backward compatibility with PHP page! ); $external_redirects = array( "php4news" => "http://cvs.php.net/co.php/php4/NEWS?p=1", "projects" => "http://freshmeat.net/browse/183/", "pear" => "http://pear.php.net/", "bugs" => "http://bugs.php.net/", "bugstats" => "http://bugs.php.net/bugstats.php", "phpdochowto" => "/manual/howto/index.html", "rev" => "/manual/$LANG/revcheck.html.gz", "blog" => "/manual/$LANG/build.log.gz", "books" => "/books.php?type_lang=PHP_$LANG" ); // ============================================================================ // "Rewrite" the URL, if it was a shortcut if (isset($uri_aliases[$URI])) { $URI = $uri_aliases[$URI]; } // ============================================================================ // Redirect if the entered URI was a PHP page name (except the books page, // which we display in the mirror's language or the explicitly specified // language [see below]) if ($URI != 'books' && file_exists("$DOCUMENT_ROOT/$URI.php")) { mirror_redirect("/$URI.php"); } // ============================================================================ // Execute external redirect if a rule exists for the URI if (isset($external_redirects[$URI])) { $true_external = (substr($external_redirects[$URI], 0, 1) != '/'); mirror_redirect($external_redirects[$URI], $true_external); } // ============================================================================ // Try to find the page using the preferred language as a manual page include_once "manual-lookup.inc"; $try = find_manual_page($LANG, $URI); if ($try) { mirror_redirect($try); } // ============================================================================ // If no match was found till this point, the last action is to start a // search with the URI the user typed in mirror_redirect( '/search.php?show=manual&lang=' . urlencode($LANG) . '&pattern=' . urlencode($_SERVER['REQUEST_URI']) ); // A 'good looking' 404 error message page function make404() { global $_SERVER; header('Status: 404 Not Found'); header("Cache-Control: public, max-age=600"); commonHeader('404 Not Found'); echo "
The page ", htmlspecialchars($_SERVER['REQUEST_URI']), " could not be found.
\n"; commonFooter(); exit; } ?>