fix(router): restore legacy rank entry aliases
This commit is contained in:
@@ -211,6 +211,19 @@ if ($strTmpCode == 'videoGpt1') {
|
|||||||
// 这里只补“旧 detail / play 深链入口”,避免历史外链、旧 sitemap、
|
// 这里只补“旧 detail / play 深链入口”,避免历史外链、旧 sitemap、
|
||||||
// 百度已抓取的旧 family URL 在路由层直接 404。
|
// 百度已抓取的旧 family URL 在路由层直接 404。
|
||||||
$legacyCompatRoutes = [
|
$legacyCompatRoutes = [
|
||||||
|
'rank_index' => [
|
||||||
|
'/paihang/index',
|
||||||
|
'/rank/index',
|
||||||
|
'/top/index',
|
||||||
|
'/phb/index',
|
||||||
|
'/phb-index',
|
||||||
|
|
||||||
|
// 历史榜单聚合入口兼容。
|
||||||
|
// 旧站点上曾出现过这类“label”别名入口,当前 GPT 新路由
|
||||||
|
// 没有注册,访问会直接落到 404。这里统一回榜单首页模板。
|
||||||
|
'/label/new.html',
|
||||||
|
'/label/new',
|
||||||
|
],
|
||||||
'detail_forge' => [
|
'detail_forge' => [
|
||||||
'/vodinfo/:strPinyin-:intVId-:intVForgeId',
|
'/vodinfo/:strPinyin-:intVId-:intVForgeId',
|
||||||
'/vod/:strPinyin-:intVId-:intVForgeId',
|
'/vod/:strPinyin-:intVId-:intVForgeId',
|
||||||
@@ -308,6 +321,10 @@ if ($strTmpCode == 'videoGpt1') {
|
|||||||
foreach ($legacyCompatRoutes as $page => $routes) {
|
foreach ($legacyCompatRoutes as $page => $routes) {
|
||||||
foreach ($routes as $route) {
|
foreach ($routes as $route) {
|
||||||
switch ($page) {
|
switch ($page) {
|
||||||
|
case 'rank_index':
|
||||||
|
$register($route, 'video/getRankIndex.html');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'detail':
|
case 'detail':
|
||||||
$register($route, 'video/getVideoInfo.html', [
|
$register($route, 'video/getVideoInfo.html', [
|
||||||
'intVId' => '\d+',
|
'intVId' => '\d+',
|
||||||
|
|||||||
Reference in New Issue
Block a user