帝国cms网站优化使tags伪静态的实现

帝国cms网站优化使tags伪静态的实现,第1张

帝国cms网站优化使tags伪静态的实现

本文的重点是详细介绍帝国cms网站的优化,使标签伪静态完整,朋友们一定要参考。

Cms网站优化值标签伪静态的完成流程如下:

1.更改e/class/t_functions.php中的sys_eShowTags函数


复制代码编码如下://Displayinformationtags
Functionsys_eshowtags($cid,$num=0,$line=0,$order='',$isgood='',$isgoodshow='',$showjg='',)
$str='';
if(empty($showjg))
{
$showjg='&;'nbsp';
}
$ln=0;
if($cid=='selfinfo')
{
if(empty($navinfor['infotags'])
{
return“”;
}
$jg='';
$r=explode(',',$navinfor['infotags']);
$count=count($r);
for($I=0;$i<$count$I)
{
$ln;
$br=“”;
if($line)
{
if($ln%$line==0)
{
$br='
';
}
}
$str。=$jg。<ahref=""。$public_r[newsurl],"e/tags/?标记名='。urlencode($r[$i])。$cs。"target="_blank">。$r[$i]。”</a>;。$br
$jg=$br?':$showjg
}
}
else
{
$and='';
$where=“”;
if($cid)
{
$where=strstrstr($cid,',')?"cidin($cid)":"cid='$cid'";
$and='and';
}
if($isgood)
{
$where。=$和。'isgood=1';
}
if($where)
{
$where='where'。$where
}
$order=$order?'。$order:'塔吉德·desc';
$limit=“”;
if($num)
{
$limit='limit'。$num
}
//强烈推荐彩色标记
$gfont1='';
$gfont2='';
if($isgoodshow)
{
if(strstrstr($isgoodshow,'r')
{
$gfont1='<;fontcolor="red">;
$gfont2='<;/font>;;
}
if(strstr($isgoodshow,s')
{
$gfont1=$gfont1';
$gfont2=''。$gfont2
}
}
$jg='';
$snum='';
$SQL=$empire->;query("selecttagid,tagname,num,isgoodfrom{$dbtbpre}enewstags")。$哪里。“排序依据”。$订单。$限额);
while($r=$empire->;fetch($SQL))
{
if($shownum)
{
$snum='('。$r[num]。”)';
}
$font1='';
$font2='';
if($isgoodshow&;&$r[isgood])
{
$font1=$gfont1;
$font2=$gfont2;
}
$ln;
$br=“”;
if($line)
{
if($ln%$line==0)
{
$br='
';
}
}
//$str。=$jg。'<ahref=""。$public_r[newsurl],"e/tags/?tagid='。$r[tagid]。$cs。"target="_blank">。$font1。$r[标记名]。$snum。$font2。</a>;。$br
$str。=$jg。'<ahref=""。$public_r[newsurl],"e/tags/'。$r[tagid]。”。html"target="_blank">。$font1。$r[标记名]。$snum。$font2。</a>;。$br
$jg=$br?':$showjg
}
}
echo$str;
}

2.URL网站根目录提升。包含以下内容的htaccess文档


复制下面的代码:重写引擎on
重写基础/
重写规则标记/(。*).html$e/tags/?tagname=$1
RewriteRulee/tags/(。*).html$e/tags/?tagid=

伪静态也应该适用于室内空房间。

1.检查Apache是否适合mod_rewrite。根据php给出的phpinfo()函数,可以根据CtrlF找到“加载的模块”,其中列出了apache2handler已经打开的所有控制模块。如果包含“mod_rewrite”就已经适用了,不再需要重新设置。
如果“mod_rewrite”没有打开,在文件目录下打开你的apache安装文件“/apache/conf/”下的httpd.conf文档,按CtrlF搜索“LoadModulerewrite_module”,删除前面的#"就可以了。
如果找不到,则转到“LoadModule”区域,在最后一行添加“LoadModuleRewrite_ModuleModules/mod_Rewrite.so”(首选exclusive行),然后重启apacheweb服务器

2.使apacheweb服务器适用于。htaccess

更改httpd.conf文档

复制以下代码:选项跟随符号链接
AllowOverrideNone

复制以下代码:选项跟随符号链接[

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/772803.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-03
下一篇 2022-05-03

发表评论

登录后才能评论

评论列表(0条)

保存