1 391 2021-03-18 16:10:31
收藏
RewriteEngine On
ErrorDocument 404 /404.php
Rewritebase /
#信息内容页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^showinfo-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3 [NC,L]
#信息列表
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^listinfo-([0-9]+)-([0-9]+).html$ /e/action/ListInfo/index.php?classid=$1&page=$2 [NC,L]
#标题分类列表页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^infotype-([0-9]+)-([0-9]+).html$ /e/action/InfoType/index.php?ttid=$1&page=$2 [NC,L]
#TAGS信息列表页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tags-(etagid[0-9]+)-([0-9]+).html$ /e/tags/index.php?tagname=$1&page=$2 [NC,L]
#评论列表页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^comment-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/pl/index.php?doaction=$1&classid=$2&id=$3&page=$4&myorder=$5&tempid=$6 [NC,L]
#栏目自定义伪静态 默认添加.html 后缀更多的后缀自行添加
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/|ad/|ebak/|web/|m2/|api)
RewriteRule ^([0-9a-zA-Z-/]+)/(|index.html|index_[0-9]+.html)$ /e/action/list.php?classid=$1&page=$2 [NC,L]
#内容自定义伪静态 默认添加.html 后缀更多的后缀自行添加
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/|ad|ebak/|web/|m2/|api)
RewriteRule ^([0-9a-zA-Z-/]+)/([0-9a-zA-Z]+)([_0-9]*).html$ /e/action/show.php?classid=$1&id=$2&page=$3 [NC,L]
rewrite ^/showinfo-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3 last;
rewrite ^/listinfo-([0-9]+)-([0-9]+).html$ /e/action/ListInfo/index.php?classid=$1&page=$2 last;
rewrite ^/infotype-([0-9]+)-([0-9]+).html$ /e/action/InfoType/index.php?ttid=$1&page=$2 last;
rewrite ^/tags-(etagid[0-9]+)-([0-9]+).html$ /e/tags/index.php?tagname=$1&page=$2 last;
rewrite ^/comment-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-(.+?).html$ /e/pl/index.php?doaction=$1&classid=$2&id=$3&page=$4&myorder=$5&tempid=$6 last;
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if ($request_uri !~ "^(/d/|/e/|/html/|/images/|/s/|/search/|/skin/|/t/|/ad/)"){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/([0-9a-zA-Z-/]+)/(|index.html|index_[0-9]+.html)$ /e/action/list.php?classid=$1&page=$2 last;
rewrite ^/([0-9a-zA-Z-/]+)/([0-9a-zA-Z]+)([_0-9]*).html$ /e/action/show.php?classid=$1&id=$2&page=$3 last;
}
if (!-e $request_filename) {
return 404;
}
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="DetailedLocalOnly">
<remove statusCode="404" />
<error statusCode="404" path="/404.php" responseMode="ExecuteURL" />
</httpErrors>
<rewrite>
<rules>
<rule name="规则 1" stopProcessing="true">
<match url="^showinfo-([0-9]+)-([0-9]+)-([0-9]+).html$" />
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="^(.*)$" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="/e/action/ShowInfo.php?classid={R:1}&id={R:2}&page={R:3}" appendQueryString="false" />
</rule>
<rule name="规则 2" stopProcessing="true">
<match url="^listinfo-([0-9]+)-([0-9]+).html$" />
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="^(.*)$" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="/e/action/ListInfo/index.php?classid={R:1}&page={R:2}" appendQueryString="false" />
</rule>
<rule name="规则 3" stopProcessing="true">
<match url="^infotype-([0-9]+)-([0-9]+).html$" />
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="^(.*)$" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="/e/action/InfoType/index.php?ttid={R:1}&page={R:2}" appendQueryString="false" />
</rule>
<rule name="规则 4" stopProcessing="true">
<match url="^tags-(etagid[0-9]+)-([0-9]+).html$" />
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="^(.*)$" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="/e/tags/index.php?tagname={R:1}&page={R:2}" appendQueryString="false" />
</rule>
<rule name="规则 5" stopProcessing="true">
<match url="^comment-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$" />
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="^(.*)$" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="/e/pl/index.php?doaction={R:1}&classid={R:2}&id={R:3}&page={R:4}&myorder={R:5}&tempid={R:6}" appendQueryString="false" />
</rule>
<rule name="规则 6" stopProcessing="true">
<match url="^([0-9a-zA-Z-/]+)/(|index.html|index_[0-9]+.html)$" />
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="^(.*)$" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{R:1}" pattern="^(d/|e/|html/|images/|s/|search/|skin/|t/|ad/|ebak/|web/|m2/|api)" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="/e/action/list.php?classid={R:1}&page={R:2}" appendQueryString="false" />
</rule>
<rule name="规则 7" stopProcessing="true">
<match url="^([0-9a-zA-Z-/]+)/([0-9a-zA-Z]+)([_0-9]*).html$" />
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="^(.*)$" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{R:1}" pattern="^(d/|e/|html/|images/|s/|search/|skin/|t/|ad|ebak/|web/|m2/|api)" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="/e/action/show.php?classid={R:1}&id={R:2}&page={R:3}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
<httpRedirect enabled="false" />
</system.webServer>
</configuration>
本文地址:https://xzo.com.cn/develop/empire/721.html
如果您认可我们的分享,有意与我们合作开展帝国cms网站建设与开发业务或插件定制,请联系右侧在线客服。我们能给您的,就是高质量的模板与售后。
标注了信息来源为下载鸥的文章皆为原创,如果是转载的优质文章,我们也都标注了出处。如果您喜欢我们的文章,请按照下载鸥所标注的文章出处进行标注,谢谢您的配合。
帝国cms是一款功能极为强大的cms程序,性能强悍、安全性高,可轻松支持10万数据,高级开发人员可制作出能容纳千万数据量的网站,是国内最出色的开源cms程序之一,推荐企业用户使用。
当前最新版本为7.5,8.0版本即将上线,新版本的核心优化点在于多终端的适配。
百度小程序的开放生态对网站站长及企业商家而言,能够从中获取到什么呢?百度智...
今天记录的问题简直匪夷所思,是帝国cms伪静态站点改成静态站点,点击清除缓存...
文章tag作为文章的重要组成部分,在信息集合上表现非常好,如果合理利用,能获得...
客户站点由于员工操作失误,直接删除了20篇文章。如果有定期备份,那恢复数据即...
有些时候,我们需要备份数据并取出来,此时从哪里去取呢?帝国cms备份的数据存储...
现如今,许多商家通过机器批量给网站发留言,一条两条还可以接受,有的商家却是拼...
有少量客户在使用帝国cms建站时发现一个问题:帝国cms显示的发布时间与真实的...
视频文件默认会被pc浏览器直接打开,此时download属性也同样无效。那么,要怎样...
帝国cms 对接纳米数据(www.nami.com)接口,本接口主要接收、整理足球比赛实时数...
下载鸥开发了这款帝国cms封禁ip插件,自动记录访问情况,让我们可以更快的识别...
本插件适用于内网用户,可查看单篇文章访问者ip地址。如果添加访问者ip组,可查...
用户体验是我们的需求,百度蜘蛛的认可更是我们的需求。毕竟,没有收录排名,何来...
帝国cms有自带的给关键词添加内链功能,但需要手动添加关键词,容易出现疏漏和...
采集站的必备资源是自动审核,要做到日收录也离不开定时发布。而本插件的自动...
帝国cms默认只有上次登录时间与ip,没有一个记录清单,所以今天,我们分享这个帝...
本插件基于帝国cms帝国cms每日自动审核插件,在自动审核指定条数信息的基础上...