最新下载
热门教程
- 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"; |
相关文章
- 沙丘觉醒怎么饮血快速解渴 饮血解渴方法介绍 07-15
- 最终幻想14水晶世界居格斯怎么打 强腕的居格斯打法分享 07-15
- 沙丘觉醒怎么更改哈克南厄崔迪家族阵营 阵营转换方法 07-15
- 欧易app注册下载 欧易app交易所v6.7.0 07-15
- 剑星乌龙谷物茶饮料罐在哪 乌龙谷物茶饮料罐收集位置一览 07-15
- 幻兽帕鲁熔岩兽出没地点 帕鲁熔岩兽捕捉位置介绍 07-15