织梦dedecms拼音伪静态的简单介绍
本文目录一览:
1、DedeCMS怎么改成伪静态页面 2、DedeCMS织梦伪静态问题 3、DedeCMS5.7伪静态怎么设置 4、DedeCMS 如何做伪静态链接 5、DedeCMS全站伪静态怎么设置 6、DedeCMS 首页和栏目如何伪静态
DedeCMS怎么改成伪静态页面
dede5.7伪静态设置七步法:
第一步、后台-系统参数-核心设置-是否使用伪静态:选择“是”;
注:你的网站空间是否支持伪静态,你可以与空间的IDC商联系一下,如果是自己的服务器,那就更好办了,自己动手,丰衣足食。一般来说,空间都是支持伪静态的。Apache服务器伪静态相对简单,直接在.htaccess文件中加入相应伪静态规则即可;而IIS服务器伪静态的实现,则需要加载Rewrite组件,然后配置httpd.ini文件。
第二步、如果你的网站已经存在生成的静态栏目或文章HTML,那么只需在后台-系统-SQL命令行工具中执行如下语句:
将所有文档设置为“仅动态浏览”:
update dede_archives set ismake=-1
将所有栏目设置为“使用动态页”:
update dede_arctype set isdefault=-1
第三步、列表页、文章页伪静态修改
打开/include/helpers/channelunit.helper.php。
,1查找:
if,$cfg_rewrite == 'Y'
{
return $GLOBALS["cfg_plus_dir"]."/view-".$aid.'-1.html';
}
替换为
if,$cfg_rewrite == 'Y'
{
return "/DedeCMS/DedeCMS5.7-".$aid.'-1.html';
}
意思是:将默认的/plus/view-1-1.html文章链接格式改为/DedeCMS/DedeCMS5.7-1-1.html。
,2 查找:
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;
替换为:
$reurl = "/category/list-".$typeid.".html";
意思是:将默认的频道或是列表页URL/plus//list.php?tid=1变更为/DedeCMS/list-1.html形式。
第四步、列表分页伪静态修改
打开/include/arc.listview.class.php
查找:
$plist = str_replace,'.php?tid=', '-', $plist;
替换为
$plist = str_replace,'plus/list.php?tid=', ‘DedeCMS/DedeCMS5.7-', $plist;
将默认的plus/list.php?tid=替换成RMB/list-;
意思是:将默认的列表分页链接格式plus/list.php?tid=x$x$xl修改为DedeCMS/DedeCMS5.7-x-x-x.html。
第五步、文章分页伪静态
打开/include/arc.archives.class.php,找到获取动态的分页列表GetPagebreakDM,函数末尾处:
查找:
$PageList = str_replace,"plus/view.php?tid=","DedeCMS/DedeCMS5.7-",$PageList;
替换为
$plist = str_replace,'plus/view.php?tid=', ’DedeCMS/DedeCMS5.7-', $plist;
将默认的plus/view.php?tid=替换成RMB/huilv-;
意思是:将默认的文章分页链接格式plus/view.php?tid=x$x$xl修改为DedeCMS/DedeCMS5.7-x-x-x.html
第六步、TAG标签伪静态
DedeCms默认的TAG标签URL,形如/tags.php?/DedeCMS模板 /,是不是觉得有个问号不怎么爽,我们改成/tags/DedeCMS模板 /,是不是好看多了。
下面我们来改一下,打开/include/taglib/tag.lib.php:
查找:
$row['link'] = $cfg_cmsurl."/tags.php?/".urlencode,$row['keyword']."/";
替换为
$row['link'] = $cfg_cmsurl."/tags/".urlencode,$row['keyword']."/";
这样就修改好了,上传你到你的网站,切记:要记得将原网站备份哦!!
第七步、httpd.ini伪静态规则:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^,.*/RMB/list-,[0-9]+\.html $1/plus/list\.php\?tid=$2 [I]
RewriteRule ^,.*/RMB/list-,[0-9]+-,[0-9]+-,[0-9]+\.html $1/plus/list\.php\?tid=$2TotalResult=$3PageNo=$4 [I]
RewriteRule ^,.*/RMB/huilv-,[0-9]+-,[0-9]+\.html $1/plus/view\.php\?arcID=$2pageno=$3 [I]
RewriteRule ^,.*/,.*_,.*_,[0-9]+\.html $1/huilv/?from=$2to=$3num=$4 [I]
RewriteRule ^,.*/tags\.html $1/tags\.php [I]
RewriteRule ^,.*/tags/,.*,?:(\?.*)* $1/tags\.php\?\/$2 [I]
RewriteRule ^,.*/tags/,.*\/,?:(\?.*)* $1/tags\.php\?\/$2\/ [I]
RewriteRule ^,.*/tags/,.*\/,[0-9],?:(\?.*)* $1/tags\.php\?\/$2\/$3 [I]
RewriteRule ^,.*/tags/,.*\/,[0-9]\/,?:(\?.*)* $1/tags\.php\?\/$2\/$3\/ [I]
将上面代码保存为:httpd.ini 上传到网站的根目录。
如无特特殊需求建议采用官方默认的生成静态的页面方式浏览。
DedeCMS织梦伪静态问题
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=$1totalresult=$2PageNo=$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=$1pageno=$2 last;
rewrite "^/tags.html$" /tags.php last;
rewrite "^/tag-,[0-9]+-,[0-9]+\.html$" /tags.php?/$1/$2/ last;
织梦伪静态规则,看下有没有写错
DedeCMS5.7伪静态怎么设置
伪静态需要空间的支持,跟织梦没啥关系,我用的iis环境,写一个web.config文件就可以,详细写法自己搜吧。。。
DedeCMS 如何做伪静态链接
“系统-基本参数-核心设置”,在是否使用伪静态的地方,勾选“是”,网站参数默认是“否”。
对于需要进行伪静态处理的网站进行动态选项。具体操作“核心-网站栏目管理-修改栏目”勾选“使用动态”。
然后修改栏目中进行伪静态的处理。
列表页显示修改之后,需要创建一个htacess文件,转换一下列表方式。
DedeCMS全站伪静态怎么设置
开启伪静态的前提条件
保证你的空间或服务器支持伪静态即URL重写
开启DedeCms伪静态
开启伪静态的方法:后台--》系统--》核心设置 找到:是否使用伪静态: 选择是 确定保存。
栏目和文章发布设置
栏目列表选项: 选择使用动态页 发布选项: 选择仅动态浏览
DEDECMS全站伪静态方法
首页伪静态
把站点根目录下index.html删除,以后不更新主页HTML即可,当然你也可以选择不使用动态首页。
频道、列表、文章伪静态
主要通过修改GetFileName,、GetTypeUrl,这两个函数实现。DedeCms V5.3、DedeCms V5.5和DedeCms V5.6版本,打开/include/channelunit.func.php进行修改。注意:DedeCms V5.7,此文件路径更改了,你打开/include/helpers/channelunit.helper.php即可。
a.将GetFileName,中的如下代码:
//动态文章
if,$cfg_rewrite == 'Y'
{
return $GLOBALS["cfg_plus_dir"]."/view-".$aid.'-1.html';
}
替换为
//动态文章
if,$cfg_rewrite == 'Y'
{
return "/archives/view-".$aid.'-1.html';
}
将文章页默认的/plus/view-1-1.html链接格式改为/archives/view-1-1.html,这个随个人喜欢,不作更改也行。
b.将GetTypeUrl,中的如下代码:
//动态
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;
替换为
//动态
$reurl = "/category/list-".$typeid.".html";
这步必须修改,即让你的频道或是列表页URL变更为/category/list-1.html形式。
列表分页伪静态
打开/include/arc.listview.class.php,找到获取动态的分页列表GetPageListDM,函数末尾处:
$plist = str_replace,'.php?tid=', '-', $plist;
替换为
$plist = str_replace,'plus', 'category', $plist;//将默认的plus替换成category$plist = str_replace,'.php?tid=', '-', $plist;将列表分页默认链接格式/plus/list-1-2-1.html修改为/category/list-1-2-1.html,这步也可以不作更改。
DEDECMS文章分页伪静态
打开/include/arc.archives.class.php,找到获取动态的分页列表GetPagebreakDM,函数末尾处:
$PageList = str_replace,".php?aid=","-",$PageList;
替换为
$plist = str_replace,'plus', 'archives', $plist;//将默认的plus替换成archives$PageList = str_replace,".php?aid=","-",$PageList;这步不作修改也可以,只是个人喜好问题。
TAG标签伪静态
DedeCms默认的TAG标签URL,形如/tags.php?/DedeCMS5.7/,非常之难看。打开/include/taglib/tag.lib.php,找到lib_tag,函数下的:
$row['link'] = $cfg_cmsurl."/tags.php?/".urlencode,$row['keyword']."/";
替换为
$row['link'] = $cfg_cmsurl."/tags/".urlencode,$row['keyword']."/";到这里,TAG标签URL中的“.php?”号就去掉了。
搜索伪静态
DedeCms搜索URL静态化比较麻烦,附带参数多不说,参数也可能变化,像搜索结果分页的URL就特麻烦,伪静态规则匹配复杂。小拼就偷下懒,将搜索URL中“search.php?…”直接替换为“search.html?…”,至于“?”号之后的参数以任意字符进行匹配。
依次打开include文件夹下的channelunit.func.php、arc.searchview.class.php、arc.taglist.class.php以及/include/taglib/hotwords.lib.php,查找“search.php?”替换为“search.html?”即可。
DedeCMS 首页和栏目如何伪静态
DedeCMS本来是静态的。
你不想用静态吗?
直接写伪静态则到 .htaccess 文件
2. 本站积分货币获取途径以及用途的解读,想在本站混的好,请务必认真阅读!
3. 本站强烈打击盗版/破解等有损他人权益和违法作为,请各位会员支持正版!
4. 建站教程 > 织梦dedecms拼音伪静态的简单介绍