![DedeCMS首页频道列表文章伪静态规则及方法,第1张 DedeCMS首页频道列表文章伪静态规则及方法,第1张](/aiimages/DedeCMS%E9%A6%96%E9%A1%B5%E9%A2%91%E9%81%93%E5%88%97%E8%A1%A8%E6%96%87%E7%AB%A0%E4%BC%AA%E9%9D%99%E6%80%81%E8%A7%84%E5%88%99%E5%8F%8A%E6%96%B9%E6%B3%95.png)
DedeCMS首页频道列表文章伪静态规则及方法
RewriteEngine On
Rewritebase /
RewriteRule ^list-([0-9]+).html$ /plus/list.php?tid=$1
RewriteRule ^list-([0-9]+)-([0-9]+)-([0-9]+).html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3
RewriteRule ^view-([0-9]+)-1.html$ /plus/view.php?arcID=$1
RewriteRule ^view-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2
文件写法。
/include/下的channelunit.func.php
修改
第一处:
if($isdefault==-1)
{
//
动态
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;
}
改为:
if($isdefault==-1)
{
//动态
//$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;
//veepic.com修改于2009.08.31
if($cfg_rewrite == 'Y')
{
$reurl = $GLOBALS['cfg_cmsurl']."/list-{$typeid}.html";
}
else
{
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;
}
}
第二处:
global $cfg_typedir_df;
改为:
global $cfg_typedir_df,$cfg_rewrite;
第三处:
if($rank!=0 || $ismake==-1 || $typeid==0 || $money>0)
{
//动态文章
if($cfg_rewrite == 'Y')
{
return $GLOBALS["cfg_plus_dir"]."/view-".$aid.'-1.html';
}
else
{
return $GLOBALS['cfg_phpurl']."/view.php?aid=$aid";
}
}
else
改为:
if($rank!=0 || $ismake==-1 || $typeid==0 || $money>0)
{
//动态文章
if($cfg_rewrite == 'Y')
{
//veepic.com修改于2009.8.31
//return $GLOBALS["cfg_plus_dir"]."/view-".$aid.'-1.html';
return $GLOBALS["cfg_cmsurl"]."/view-".$aid.'-1.html';
}
else
{
return $GLOBALS['cfg_phpurl']."/view.php?aid=$aid";
}
}
else
评论列表(0条)