From 0b9a45e5c48238c24e9cabbc77de51cc7b32495f Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Apr 2026 13:05:50 +0800 Subject: [PATCH] fix(router): restore legacy rank entry aliases --- code/app/home/config/router.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/app/home/config/router.php b/code/app/home/config/router.php index 0af920c..9735eb2 100644 --- a/code/app/home/config/router.php +++ b/code/app/home/config/router.php @@ -211,6 +211,19 @@ if ($strTmpCode == 'videoGpt1') { // 这里只补“旧 detail / play 深链入口”,避免历史外链、旧 sitemap、 // 百度已抓取的旧 family URL 在路由层直接 404。 $legacyCompatRoutes = [ + 'rank_index' => [ + '/paihang/index', + '/rank/index', + '/top/index', + '/phb/index', + '/phb-index', + + // 历史榜单聚合入口兼容。 + // 旧站点上曾出现过这类“label”别名入口,当前 GPT 新路由 + // 没有注册,访问会直接落到 404。这里统一回榜单首页模板。 + '/label/new.html', + '/label/new', + ], 'detail_forge' => [ '/vodinfo/:strPinyin-:intVId-:intVForgeId', '/vod/:strPinyin-:intVId-:intVForgeId', @@ -308,6 +321,10 @@ if ($strTmpCode == 'videoGpt1') { foreach ($legacyCompatRoutes as $page => $routes) { foreach ($routes as $route) { switch ($page) { + case 'rank_index': + $register($route, 'video/getRankIndex.html'); + break; + case 'detail': $register($route, 'video/getVideoInfo.html', [ 'intVId' => '\d+',