fix(router): restore legacy rank entry aliases

This commit is contained in:
root
2026-04-17 13:05:50 +08:00
parent 0c534d2903
commit 0b9a45e5c4

View File

@@ -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+',