【发布时间】:2021-01-28 13:52:19
【问题描述】:
我想将 html 桌面页面从“m”子域重定向到 html 移动页面。我相信我必须更改页面中的某些内容,因此我在其他网络平台上找到了一些设置。问题是,它不起作用。
在桌面页面中添加此代码(更改链接):
<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.yoursite.com/test.html" />
<link rel="amphtml" href="https://m.yoursite.com/test.html?amp" />
在移动页面中添加这个(更改链接):
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<link rel="canonical" href="https://m.yoursite.com/test.html"/>
<link rel="amphtml" href="https://m.yoursite.com/test.html?amp"/>
<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.yoursite.com/test.html"/>
<meta name="cXenseParse:pageclass" content="article"/>
<meta name="cXenseParse:url" content="https://m.yoursite.com/test.html"/>
<meta name="robots" content="follow,index,noodp"/>
<meta name="robots" content="max-snippet:-1, max-image-preview:large, max-video-preview:-1"/>
<meta name="referrer" content="origin-when-cross-origin"/>
<meta property="og:url" content="https://m.yoursite.com/test.html" />
我需要更改 php 中的某些内容吗?我必须做什么才能工作?
【问题讨论】: