index 页面
<meta name="mobile-agent" content="format=html5;url=https://m.mornread.com">
<meta name="mobile-agent" content="format=xhtml;url=https://m.mornread.com">
<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.mornread.com" />
<meta http-equiv="mobile-agent" content="format=wml; url=https://m.mornread.com">
分类页面:
<meta name="mobile-agent" content="format=html5;url=https://m.mornread.com{dede:type typeid='0' row=1}[field:typelink/]{/dede:type}">
<meta name="mobile-agent" content="format=xhtml;url=https://m.mornread.com{dede:type typeid='0' row=1}[field:typelink/]{/dede:type}">
<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.mornread.com{dede:type typeid='0' row=1}[field:typelink/]{/dede:type}" />
<meta http-equiv="mobile-agent" content="format=wml; url=https://m.mornread.com{dede:type typeid='0' row=1}[field:typelink/]{/dede:type}">
这里的typeid='0′row=1 即表示获取当前栏目页的地址,这个方法通用语顶级栏目页和次级栏目页。
内容页面:
<meta name="mobile-agent" content="format=html5;url=https://m.mornread.com{dede:field name='arcurl'/}">
<meta name="mobile-agent" content="format=xhtml;url=https://m.mornread.com{dede:field name='arcurl'/}">
<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.mornread.com{dede:field name='arcurl'/}" />
<meta http-equiv="mobile-agent" content="format=wml; url=https://m.mornread.com{dede:field name='arcurl'/}">
针对不同的移动端网站,我们还需要做下applicable-device标注声明,主要根据自己网站的情况分以下几种,请结合自己的网站情况使用:
仅PC协议(添加在独立pc页面头部) <meta name="applicable-device" content="pc">
仅PH协议 (添加在移动端网站页面头部) <meta name="applicable-device"content="mobile">
自适应协议 (添加在独立pc页面头部) <meta name="applicable-device"content="pc,mobile">