1.首在在dede后台开启伪静态.
2.所有老文章动态改静态
进入“系统” –> “SQL命令行工具” 输入以下命令
所有文章设置为动态执行SQL: update dede_archives set ismake=-1
所有栏目设置为动态执行SQL: update dede_arctype set isdefault=-1
3. nginx设置重写规则. 内容为:
rewrite “^/index.html$” /index.php last;
rewrite “^/list-([0-9]+).html$” /plus/list.php?tid=$1 last;
rewrite “^/list-([0-9]+)-([0-9]+)-([0-9]+).html$” /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 last;
rewrite “^/view-([0-9]+)-1.html$” /plus/view.php?arcID=$1 last;
rewrite “^/view-([0-9]+)-([0-9]+).html$” /plus/view.php?aid=$1&pageno=$2 last;
break;
修改/include/helpers/channelunit.helper.php文件
return $GLOBALS["cfg_plus_dir"].”/view-”.$aid.’-1.html’;
修改为:
return $GLOBALS["cfg_cmsurl"].”/view-”.$aid.’-1.html’;
原来大约166行为:
$reurl = $GLOBALS['cfg_phpurl'].”/list.php?tid=”.$typeid;
修改为:
$reurl = $GLOBALS['cfg_cmsurl'].”/list-{$typeid}.html”;
搞定收工!