程序人生:dedecms伪静态的实现方法

操作如下:
1、后台-系统参数-核心设置-是否使用伪静态:选择
注:你的网站空间是否支持伪静态,你可以与空间的IDC商联系一 下,如果是自己的服务器,那就更好办了,自己动手,丰衣足食。一般来说,空间都是支持伪静态的。Apache服务器伪静态相对简单,直接 .htaccess文件中加入相应伪静态规则即可;而IIS服务器伪静态的实现,则需要加载Rewrite组件,然后配置httpd.ini文件。
2、如果你的网站已经存在生成的静态栏目或文章HTML,那么只需在后台-系统-SQL命令行工具中执行如下语句:
DEDECMS  godaddy 空间的伪静态设置方法详解

如何设置DedeCMS问答模块rewrite伪静态教程

dedecms5.7 问答模块实现伪静态的方法

dedecms织梦全站伪静态规则
将所有文档设置为仅动态浏览

update dede_archives set ismake=-1

将所有栏目设置为使用动态页

update dede_arctype set isdefault=-1

3、列表页、文章页伪静态修改

打开/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形式。

4、列表分页伪静态修改

打开/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
5、文章分页伪静态
打开/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

6TAG标签伪静态
DedeCms默认的TAG标签URL,形如/tags.php?/

 

猜你喜欢

转载自blog.csdn.net/qq_42302805/article/details/84663293