伪静态怎么弄

伪静态怎么弄,第1张

dedecms5.3伪静态及rewrite规则

因为我用的是机车采集,自动升级,每次采集后手工做一个栏目列表页面不方便,所以我在考虑把栏目页面做成伪静态。dede默认适用!

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)
CacheClockRate3600
RepeatLimit32
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

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

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/773657.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-03
下一篇 2022-05-03

发表评论

登录后才能评论

评论列表(0条)

保存