com web/php: Fixed bug #64273 (Requesting nonexistent files should produce HTTP 404 Not Found): error.php
| From: | Hannes Magnusson | Date: | Fri, 27 Dec 2013 00:45:58 +0000 |
| Subject: | com web/php: Fixed bug #64273 (Requesting nonexistent files should produce HTTP 404 Not Found): error.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-17804@lists.php.net to get a copy of this message | ||
Commit: ef1389c73d9f19623338a603c904b1a4a69f1734
Author: Hannes Magnusson <bjori@mongodb.com> Thu, 26 Dec 2013 16:45:58 -0800
Parents: ab3c553caa2abccb0431a668fe2df879abc628d8
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=ef1389c73d9f19623338a603c904b1a4a69f1734
Log:
Fixed bug #64273 (Requesting nonexistent files should produce HTTP 404 Not Found)
Bugs:
https://bugs.php.net/64273
Changed paths:
M error.php
Diff:
diff --git a/error.php b/error.php
index 7f30b14..63a2083 100644
--- a/error.php
+++ b/error.php
@@ -120,7 +120,8 @@ if (preg_match("!^manual/(\\w+)/(print|printwn|html)((/.+)|$)!", $URI,
$array))
// If someone is looking for something in distributions/* and it isn't there,
// send them to the /releases page since that is likely to be most helpful.
if (preg_match("!^distributions/.*!", $URI, $array)) {
- mirror_redirect("/releases/");
+ status_header(404);
+ include_once $_SERVER['DOCUMENT_ROOT'] . "/releases/index.php";
}
// ============================================================================
@@ -537,6 +538,6 @@ mirror_redirect(
'&pattern=' . urlencode(substr($_SERVER['REQUEST_URI'], 1))
);
/*
- * vim:et
+ * vim: set et ts=4 sw=4 ft=php: :
*/
?>