restore admin helper chain and stabilize seo routes
This commit is contained in:
@@ -185,6 +185,135 @@ if ($strTmpCode == 'videoGpt1') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 4️⃣ 历史深页兼容路由 ==========
|
||||
// videoGpt1 主输出仍然只走当前 family,
|
||||
// 这里只补“旧 detail / play 深链入口”,避免历史外链、旧 sitemap、
|
||||
// 百度已抓取的旧 family URL 在路由层直接 404。
|
||||
$legacyCompatRoutes = [
|
||||
'detail_forge' => [
|
||||
'/vodinfo/:strPinyin-:intVId-:intVForgeId',
|
||||
'/vod/:strPinyin-:intVId-:intVForgeId',
|
||||
'/video-info/:strPinyin-:intVId-:intVForgeId',
|
||||
'/video-detail/:strPinyin-:intVId-:intVForgeId',
|
||||
'/video/:strPinyin-:intVId-:intVForgeId',
|
||||
'/shipin/:strPinyin-:intVId-:intVForgeId',
|
||||
'/shipin-xiangqing/:strPinyin-:intVId-:intVForgeId',
|
||||
'/shipin-neiron/:strPinyin-:intVId-:intVForgeId',
|
||||
|
||||
'/voddetail/-:intVId-:intVForgeId',
|
||||
'/vodinfo/-:intVId-:intVForgeId',
|
||||
'/vod/-:intVId-:intVForgeId',
|
||||
'/video-info/-:intVId-:intVForgeId',
|
||||
'/video-detail/-:intVId-:intVForgeId',
|
||||
'/video/-:intVId-:intVForgeId',
|
||||
'/shipin/-:intVId-:intVForgeId',
|
||||
'/shipin-xiangqing/-:intVId-:intVForgeId',
|
||||
'/shipin-neiron/-:intVId-:intVForgeId',
|
||||
|
||||
'/voddetail/:intVId-:intVForgeId',
|
||||
'/vodinfo/:intVId-:intVForgeId',
|
||||
'/vod/:intVId-:intVForgeId',
|
||||
'/video-info/:intVId-:intVForgeId',
|
||||
'/video-detail/:intVId-:intVForgeId',
|
||||
'/video/:intVId-:intVForgeId',
|
||||
'/shipin/:intVId-:intVForgeId',
|
||||
'/shipin-xiangqing/:intVId-:intVForgeId',
|
||||
'/shipin-neiron/:intVId-:intVForgeId',
|
||||
],
|
||||
'detail' => [
|
||||
'/voddetail/:strPinyin-:intVId',
|
||||
'/vodinfo/:strPinyin-:intVId',
|
||||
'/vod/:strPinyin-:intVId',
|
||||
'/video-info/:strPinyin-:intVId',
|
||||
'/video-detail/:strPinyin-:intVId',
|
||||
'/video/:strPinyin-:intVId',
|
||||
'/shipin/:strPinyin-:intVId',
|
||||
'/shipin-xiangqing/:strPinyin-:intVId',
|
||||
'/shipin-neiron/:strPinyin-:intVId',
|
||||
|
||||
'/voddetail/-:intVId',
|
||||
'/vodinfo/-:intVId',
|
||||
'/vod/-:intVId',
|
||||
'/video-info/-:intVId',
|
||||
'/video-detail/-:intVId',
|
||||
'/video/-:intVId',
|
||||
'/shipin/-:intVId',
|
||||
'/shipin-xiangqing/-:intVId',
|
||||
'/shipin-neiron/-:intVId',
|
||||
|
||||
'/voddetail/:intVId',
|
||||
'/vodinfo/:intVId',
|
||||
'/vod/:intVId',
|
||||
'/video-info/:intVId',
|
||||
'/video-detail/:intVId',
|
||||
'/video/:intVId',
|
||||
'/shipin/:intVId',
|
||||
'/shipin-xiangqing/:intVId',
|
||||
'/shipin-neiron/:intVId',
|
||||
],
|
||||
'play' => [
|
||||
'/vodplay/:strPinyin-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/vodbf/:strPinyin-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/vodseed/:strPinyin-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/video-play/:strPinyin-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/video-bofang/:strPinyin-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/video-show/:strPinyin-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/shipin-play/:strPinyin-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/shipin-bofang/:strPinyin-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/shipin-kan/:strPinyin-:intVId-:strPlayType-:intPlayIndex',
|
||||
|
||||
'/vodplay/-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/vodbf/-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/vodseed/-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/video-play/-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/video-bofang/-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/video-show/-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/shipin-play/-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/shipin-bofang/-:intVId-:strPlayType-:intPlayIndex',
|
||||
'/shipin-kan/-:intVId-:strPlayType-:intPlayIndex',
|
||||
|
||||
'/vodplay/:intVId-:strPlayType-:intPlayIndex',
|
||||
'/vodbf/:intVId-:strPlayType-:intPlayIndex',
|
||||
'/vodseed/:intVId-:strPlayType-:intPlayIndex',
|
||||
'/video-play/:intVId-:strPlayType-:intPlayIndex',
|
||||
'/video-bofang/:intVId-:strPlayType-:intPlayIndex',
|
||||
'/video-show/:intVId-:strPlayType-:intPlayIndex',
|
||||
'/shipin-play/:intVId-:strPlayType-:intPlayIndex',
|
||||
'/shipin-bofang/:intVId-:strPlayType-:intPlayIndex',
|
||||
'/shipin-kan/:intVId-:strPlayType-:intPlayIndex',
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($legacyCompatRoutes as $page => $routes) {
|
||||
foreach ($routes as $route) {
|
||||
switch ($page) {
|
||||
case 'detail':
|
||||
$register($route, 'video/getVideoInfo.html', [
|
||||
'intVId' => '\d+',
|
||||
'strPinyin' => '[\w-]+',
|
||||
]);
|
||||
break;
|
||||
|
||||
case 'detail_forge':
|
||||
$register($route, 'video/getVideoInfo.html', [
|
||||
'intVId' => '\d+',
|
||||
'strPinyin' => '[\w-]+',
|
||||
'intVForgeId' => '\d+',
|
||||
]);
|
||||
break;
|
||||
|
||||
case 'play':
|
||||
$register($route, 'video/getVideoPlayUrl.html', [
|
||||
'intVId' => '\d+',
|
||||
'strPinyin' => '[\w-]+',
|
||||
'strPlayType' => '[\w-]+',
|
||||
'intPlayIndex' => '\d+',
|
||||
]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
} else {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
{elseif $variant == 4}
|
||||
<div class="{$TpStyle.dom_prefix}-dm-action v4">
|
||||
<button onclick="location.href='{$playUrl}'">立即观看</button>
|
||||
<button onclick="location.href='{site:vpurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en" play_type="default" play_index="1" /}'">立即观看</button>
|
||||
</div>
|
||||
|
||||
{elseif $variant == 5}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<meta name="robots" content="noindex,follow">
|
||||
|
||||
{if $Request.route.intVId }
|
||||
<link rel="canonical" href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="" /}'>
|
||||
<link rel="canonical" href='https://{$DomainModel->d_domain}{site:vurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en" /}'>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user