郑州SEO感悟与收集,关于生活与工作的回忆!你们能找到我也所你们本事大,哈哈….

DedeCms5.7伪静态教程

2011-12-14

1.前提是空间支持伪静态
2.开开启DedeCms伪静态:后台-系统参数-核心设置-是否使用伪静态:选择“是”
3.创建栏目或批量增加栏目时,选择“使用动态页”
4.添加新文章时,发布选项:选择“仅动态浏览 ”。如果已经发布很多内容那么只需在后台-系统-SQL命令行工具中执行如下语句:
update dede_arctype set isdefault=-1;
update dede_archives set ismake=-1;
5.修改文件源码
(1).DedeCms首页伪静态:删除站点根目录下index.html.
(2).列表页DedeCms频道
V5.7,此文件路径更改了,你打开/include/helpers/channelunit.helper.php
将GetTypeUrl()中的如下代码:
//动态
$reurl = $GLOBALS['cfg_phpurl'].”/list.php?tid=”.$typeid;
替换为
//动态
$reurl = “/category/list-”.$typeid.”.html”;

(3).内容页面设置
V5.7,此文件路径更改了,你打开/include/helpers/channelunit.helper.php

将GetFileName()中的如下代码:
//动态文章
if($cfg_rewrite == ‘Y’)
{
return $GLOBALS["cfg_plus_dir"].”/view-”.$aid.’-1.html’;
}
替换为
//动态文章
if($cfg_rewrite == ‘Y’)
{
return “/archives/view-”.$aid.’-1.html’;
}
6创建.htaccess文件,加入如下规则:
RewriteRule ^/category/list-([0-9]+).html$ /plus/list.php?tid=$1
RewriteRule ^/category/list-([0-9]+)-([0-9]+)-([0-9]+).html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3
RewriteRule ^/archives/view-([0-9]+)-([0-9]+).html$ /plus/view.php?arcID=$1&pageno=$2

作者:背影 | 分类目录:程序文章整理 | 标签:

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>