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 

相关文章

文章浏览阅读483次。dedecms织梦频道模板中调用栏目分类并排...
文章浏览阅读284次。我们在用织梦建站的过程中,难免会遇到各...
文章浏览阅读152次。seo专题是seo优化必不可少的一环,对于网...
文章浏览阅读142次。在Dedecms中,在列表页调用文章摘要的方...
文章浏览阅读234次。织梦DedeCMS文章内容发布时可以选择“头...
文章浏览阅读701次。虽然织梦DedeCMS因为安全问题被人所诟病...