最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
dedecms 开启伪静态配置方法
时间:2022-06-25 16:40:26 编辑:袖梨 来源:一聚教程网
如果是Apache的服务器,就在.htaccess里面写上
代码如下 | 复制代码 |
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 |
IIS的服务器,在httpd.ini里面写上,前提是要服务器安装过ISAPI Rewrite
[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 |
然后我们修改dedecms的程序,打开includechannelunit.func.php
代码如下 | 复制代码 |
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid; |
替换为
代码如下 | 复制代码 |
$reurl = $GLOBALS['cfg_phpurl']."/list-".$typeid.".html"; |
相关文章
- 碧蓝航线的里雅斯特期待的便当时间皮肤有什么 04-30
- 明日之后踏浪逐星服装展示攻略 04-30
- 深空之眼幽月塞勒涅刻印搭配核心思路 04-30
- 明日之后红杉茶会护卫队首领BOSS有哪些 04-30
- CF手游段位奖励汇总攻略 04-30
- 无期迷途5-13怎么走攻略 04-30