Commit:    ae8ead9dde45e358a3b6f7241df740dd8a1681ad
Author:    Hannes Magnusson <[email protected]>         Thu, 26 Dec 2013 
16:45:58 -0800
Parents:   bf8cf692c964846c72130ac95c9aa6e6e5371217
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=ae8ead9dde45e358a3b6f7241df740dd8a1681ad

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: :
  */
 ?>


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to