最新下载
热门教程
- 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"; |
相关文章
- 《弓箭传说2》新手玩法介绍 01-16
- 《地下城与勇士:起源》断桥烟雨多买多送活动内容一览 01-16
- 《差不多高手》醉拳龙技能特点分享 01-16
- 《鬼谷八荒》毕方尾羽解除限制道具推荐 01-16
- 《地下城与勇士:起源》阿拉德首次迎新春活动内容一览 01-16
- 《差不多高手》情圣技能特点分享 01-16