欢迎来到站长天空!

DedeCMS

当前位置: 主页 > CMS教程 > DedeCMS

dedecms5.3伪静态及rewrite规则

时间:2020-11-05 00:00:00|栏目:DedeCMS|点击:

">1 首先需要在后台开启伪静态(服务器必须支持)
2 设置栏目必须是使用动态页
3修改 include/channelunit.func.php 文件
查找

代码如下:
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;

替换成:

代码如下:
$reurl = $GLOBALS['cfg_phpurl']."/list-".$typeid.".html";

该处的修改是为了把导航及dede默认的动态链接换成静态

如果你想文章页也伪静态 那么在添加文档时选择 高级参数—>仅动态浏览
附上伪静态规则
iis

代码如下:
[ISAPI_Rewrite]
# 缓存3600秒 = 1 小时(hour)
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*)/index.html $1/index.php
RewriteRule ^(.*)/plus/list-([0-9]+).html $1/plus/list.php?tid=$2
RewriteRule ^(.*)/plus/list-([0-9]+)-([0-9]+)-([0-9]+).html $1/plus/list.php?tid=$2&TotalResult=$3&PageNo=$4
RewriteRule ^(.*)/plus/view-([0-9]+)-([0-9]+).html $1/plus/view.php?arcID=$2&pageno=$3
apache

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule index.html /index.php
RewriteRule plus/list-([0-9]+).html$ /plus/list.php?tid=$1
RewriteRule plus/view-([0-9]+)-([0-9]+).html$ /plus/view.php?arcID=$1&pageno=$3
RewriteRule plus/list-([0-9]+)-([0-9]+)-([0-9]+).html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3

上一篇:dedecms 5.5 伪静态化ReWrite规则

栏    目:DedeCMS

下一篇:DEDECMS实现禁止游客发表评论

本文标题:dedecms5.3伪静态及rewrite规则

本文地址:https://zz.feitang.co/CMSjiaocheng/27072.html

广告投放 | 联系我们 | 版权申明

申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:257218569 | 邮箱:257218569@qq.com

Copyright © 2018-2026 站长天空 版权所有 Powered by EyouCms冀ICP备14023439号