Discuz   发布时间:2019-10-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Discuz! X1简单SEO大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

<span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium 'Times New Roman'; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="line-height: 16px; font-family: 'Trebuchet MS',Arial,sans-serif; color: rgb(64,64,64); font-size: 13px" class="Apple-style-span">
<p style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">Discuz! X1针对以往版本最大的区别就是增加了门户,发现了门户与论坛的标题都是相同的,并且index.php和portal.php都指向根目录,这样就造成了三个地址的页面内容重复,而导致搜索引擎降权,这样不利于SEO。提出以下修改方案。首先,把index.php统一指向到根目录,就是要把index.php都改成”/”1、页面顶部LOGO的,template\default\common\header.html2、导航条的,template\default\下所有文件批量更换”index.php”为”/”其次,Discuz! X1顶部导航两个页面为portal.php和forum.php,比如我要把forum.php设定为首页1、在数据库common_nav表里更改forum.php为”/”,这个对应后台:界面 – 导航栏再次,Discuz! X1导航条里论坛页面还会显示forum.php,也要把这个改掉,尽一切可能消除被搜索引擎收录重复页的可能1、在\source\module\forum\下所有文件批量更换”forum.php”为”/”


<p style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">这样改后,index.php,forum.php全部都改成了根目录”/”,现在修改Discuz! X1门户标题和论坛标题重复


<p style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 16px">修改\template\default\common\header.htm的titlE区$_G['setTing']['bbname']为


<div style="overflow-x: auto; overflow-y: auto; BACkground-color: rgb(231,229,220); margin: 18px 0px; width: 594px; font-family: Consolas,'Courier New',Courier,mono; font-size: 12px; padding-top: 1px" class="dp-highlighter">
<div style="padding-left: 45px" class="bar">
<div style="border-left: rgb(108,226,108) 3px solid; padding-bottom: 10px; BACkground-color: rgb(248,248,248); padding-left: 10px; padding-right: 8px; font: 9px Verdana,Geneva,Helvetica,sans-serif; color: silver; padding-top: 3px" class="tools">
<a style="outline-style: none; color: rgb(160,160,160); font-size: 9px; margin-right: 10px; text-decoration: none" onclick="dp.sh.Toolbar.Command('Viewsource',this);return false;" href="#">view plain<a style="outline-style: none; color: rgb(160,160); font-size: 9px; margin-right: 10px; text-decoration: none" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;" href="#">copy to clipboard<a style="outline-style: none; color: rgb(160,160); font-size: 9px; margin-right: 10px; text-decoration: none" onclick="dp.sh.Toolbar.Command('Printsource',this);return false;" href="#">print<a style="outline-style: none; color: rgb(160,160); font-size: 9px; margin-right: 10px; text-decoration: none" onclick="dp.sh.Toolbar.Command('About',this);return false;" href="#">?

    BACkground-color: rgb(255,255,255); list-style-type: decimal-leading-zero; margin: 0px 0px 1px 45px; padding-left: 0px; padding-right: 0px; color: rgb(92,92,92); padding-top: 0px" class="dp-c">
  1. BACkground-color: rgb(255,255); padding-left: 0px !important; width: 543px; padding-right: 0px !important; word-break: break-all; padding-top: 10px !important" class="alt">{); font-weight: bold" class="keyword">ifString">'basescript'String">'portal'String">'setTing'String">'sitename'{); font-weight: bold" class="keyword">elseString">'setTing'String">'bbname'{/); font-weight: bold" class="keyword">if  

ename,站点名称对应bbname,这样就能实现门户标题为sitename,论坛标题为bbname了。

大佬总结

以上是大佬教程为你收集整理的Discuz! X1简单SEO全部内容,希望文章能够帮你解决Discuz! X1简单SEO所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:
猜你在找的Discuz相关文章
其他相关热搜词更多
phpJavaPython程序员load如何string使用参数jquery开发安装listlinuxiosandroid工具javascriptcap