以服务于中国广大创业者为己任,立志于做最好的创业网站。

标签云创业博客联系我们

导航菜单

手机建站,站长工具

移动终端时代,大部分dede企业网站都没有考虑过如何对移动终端进行改版(参考移动终端模仿站),如何获取流量。本内容主要内容是百度、360、搜狗、神马等搜索引擎移动适配规则。

从dede的程序分析中,我们可以得到三种链接。

主页

列表页

内容页(包括主题页)

三种链接格式出来,两种格式就够了。

网址格式(个人电脑链接:http://www.gtqmy.com移动链接:http://www.gtqmy.com/m)

模式模式(你需要对规律性有所了解)

那么对应的首页和列表页可以直接使用URL格式,而内容页因为内容量的问题只能使用Pattern模式匹配链接。

百度移动适配规则

内容页面移动适配

网站:http://zhanzhang.baidu.com/

#(w)代表字符串,而(d)代表数字

http://www.gtqmy.com/(w)/(d)。html #对应于:http://www.gtqmy.com/news/gsxw/206.html

">l


#${2} 对应着上面第一条的第二个参数,第二个数字为内容的ID值 ,同理${3}对应的是第三个参数 http://www.gtqmy.com/m/view.php?aid=${2} #对应着:http://www.gtqmy.com/m/view.php?aid=993 http://www.gtqmy.com/m/view.php?aid=${3} #对应着:http://www.gtqmy.com/m/view.php?aid=725


dedecms各大搜索引擎移动端适配规则




列表页适配


因为dede列表页,与移动的无逻辑性的关系,所以就要使用URL的方式提交链接。(当然您说你的移动端做了伪静态,你的PC做了动态就寻其他的方法吧)。




如果只是几个栏目,那么还好处理,如果像待产包最全清单网站130多个栏目,那估计就搞死个人了。看dede仿站里面有一篇这样的内容dede仿站第四课:为了他(她)套上它,可以通过标签获取到栏目的链接,这样就解决了。




#下面注释仅供理解阅读使用,如需使用,请删除注释内容


{dede:channelartlist row=100 typeid='top'}


#获取顶级栏目的链接,以及ID值,pc链接与移动链接中间用空格隔开(百度使用,其他的搜索引擎是TAB间隔)


http://www.gtqmy.com{dede:field name='typeurl'/} http://www.gtqmy.com/m/list.php?tid={dede:field name='id'/}


#获取顶级栏目下的下级栏目的链接,以及ID值


{dede:channel type='son' noself='true'}


http://www.gtqmy.com[field:typelink/] http://www.gtqmy.com/m/list.php?tid=[field:id/]<br>


{/dede:channel}


{/dede:channelartlist}


上述代码可以放在任何一个模板位置上,当然建议还是放在底部,收集到栏目相关链接后,然后就修改过来。




dedecms各大搜索引擎移动端适配规则




剩下的就是提交规则,等到百度审核。




360移动适配


360站长:http://zhanzhang.so.com/




列表页适配


url匹配规则,中间间隔换为tab键,保存为txt文件放置到网站任意目录。




内容页移动适配


与百度的规则无多大区别,只是${2}换成了2




#(w+)代表字符串,(d+)表示数字


http://www.gtqmy.com/(w+)/(d+).html #对应着:http://www.gtqmy.com/news/gsxw/206.htmll




#${2} 对应着上面第一条的第二个参数,第二个数字为内容的ID值 ,同理${3}对应的是第三个参数 http://www.gtqmy.com/m/view.php?aid=2 #对应着:http://www.gtqmy.com/m/view.php?aid=993 http://www.gtqmy.com/m/view.php?aid=3 #对应着:http://www.gtqmy.com/m/view.php?aid=725


搜狗移动适配


搜狗站长:http://zhanzhang.sogou.com/




列表页适配


搜狗的URL适配跟其他的搜索引擎都不一样,需要是xml格式,且还有一堆参数。




如果你栏目的比较多,那么建议您,看看python的文件操作,这样几百个链接瞬间也可以处理完成。




<?xml version="1.0" encoding="UTF-8" ?>


<!-- XML文件需以utf-8编码 -->


<urlset>


<url>


<loc>http://www.gtqmy.com/</loc> # PC链接


<data>


<display>


<url_pattern>http://www.gtqmy.com/m/</url_pattern> #移动端链接


<version>7</version>


</display>


</data>


</url>


# 第二组


<url>


<loc>http://www.gtqmy.com/about/</loc>


<data>


<display>


<url_pattern>http://www.gtqmy.com/m/list.php?tid=1</url_pattern>


<version>7</version>


</display>


</data>


</url>


#第二组结束,以<url>开头</url>结束


</urlset>


内容页移动适配


<?xml version="1.0" encoding="UTF-8" ?>


<!-- XML文件需以utf-8编码 -->


<urlset>


<url>


<loc>http://www.gtqmy.com</loc> #入口链接


<data>


<display>


<pc_url_pattern>http://www.gtqmy.com/(w+)/(d+).html</pc_url_pattern>


<url_pattern>http://www.gtqmy.com/m/view.php?aid=${2}</url_pattern>


<pc_sample>http://www.gtqmy.com/news/gsxw/206.html</pc_sample> #符合上述规则的PC链接


<wap_sample>http://www.gtqmy.com/m/view.php?aid=206</wap_sample> #符合上述规则的移动端链接


<version>7</version>


</display>


</data>


</url>


# 第二组开始


<url>


<loc>http://www.gtqmy.com</loc>


<data>


<display>


<pc_url_pattern>http://www.gtqmy.com/(w+)/(w+)/(d+).html</pc_url_pattern>


<url_pattern>http://www.gtqmy.com/m/view.php?aid=${3}</url_pattern>


<pc_sample>http://www.gtqmy.com/news/gsxw/206.html</pc_sample>


<wap_sample>http://www.gtqmy.com/m/view.php?aid=206</wap_sample>


<version>7</version>


</display>


</data>


</url>


#第二组结束,以<url>开头</url>结束


</urlset>


制作完成,保存xml文件格式,上传到网站。








神马移动适配


神马站长:http://zhanzhang.sm.cn/




列表页适配


url匹配规则,中间间隔换为tab键,保存为txt文件放置到网站任意目录。同360搜索引擎




内容页移动适配


<?xml version="1.0" encoding="UTF-8"?>


<urlset>


<url>


<loc>http://www.gtqmy.com</loc> #网站首页


<data>


<display>


<pc_url_pattern>


http://www.gtqmy.com/(w+)/(d+).html


</pc_url_pattern> #PC端网页


<xhtml_url_pattern > http://www.gtqmy.com/m/view.php?aid=${2}


</xhtml_url_pattern> #html5手机页


</display>


</data>


</url>


#第二组开始


<url>


<loc>http://www.gtqmy.com</loc>


<data>


<display>


<pc_url_pattern>


http://www.gtqmy.com/(w+)/(w+)/(d+).html


</pc_url_pattern>


<xhtml_url_pattern > http://www.gtqmy.com/m/view.php?aid=${2}


</xhtml_url_pattern>


</display>


</data>


</url>


#第二组结束,以<url>开头</url>结束


</urlset>


至此各大搜索引擎的移动适配规则告一段落,可能会有所偏差,但上述的内容应该通用于大部分的dede网站的移动适配。