Author: Máté Kocsis (kocsismate) Committer: GitHub (web-flow) Pusher: kocsismate Date: 2022-01-16T18:42:00+01:00
Commit: https://github.com/php/web-php/commit/99479aa988480114ca5e4fe67cb1879bc3dd5356 Raw diff: https://github.com/php/web-php/commit/99479aa988480114ca5e4fe67cb1879bc3dd5356.diff Fix ext/oci redirections (#490) Changed paths: M error.php Diff: diff --git a/error.php b/error.php index 8b97cb516..449bb0811 100644 --- a/error.php +++ b/error.php @@ -245,8 +245,18 @@ // Refactored 'regexp.reference' => 'regexp.introduction', +); + +if (isset($manual_page_moves[$URI])) { + status_header(301); + mirror_redirect("/" . $manual_page_moves[$URI]); +} elseif (preg_match("!^manual/([^/]+)/([^/]+).php$!", $URI, $match) && + isset($manual_page_moves[$match[2]])) { + status_header(301); + mirror_redirect("/manual/$match[1]/" . $manual_page_moves[$match[2]] . ".php"); +} - // Renamed classes and methods +$manual_redirections = array( 'class.oci-lob' => 'class.ocilob', 'oci-lob.append' => 'ocilob.append', 'oci-lob.close' => 'ocilob.close', @@ -279,13 +289,9 @@ 'oci-collection.trim' => 'ocicollection.trim', ); -if (isset($manual_page_moves[$URI])) { - status_header(301); - mirror_redirect("/" . $manual_page_moves[$URI]); -} elseif (preg_match("!^manual/([^/]+)/([^/]+).php$!", $URI, $match) && - isset($manual_page_moves[$match[2]])) { +if (preg_match("!^manual/([^/]+)/([^/]+)$!", $URI, $match) && isset($manual_redirections[$match[2]])) { status_header(301); - mirror_redirect("/manual/$match[1]/" . $manual_page_moves[$match[2]] . ".php"); + mirror_redirect("/manual/$match[1]/" . $manual_redirections[$match[2]]); } // ============================================================================ -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php