中药方大全小图标
您当前的位置:首页 > 其他 > 网站日记

帝国cms7.5伪静态规则大全

提示: 阅读权限:公开  来源:原创  作者:中药方大全

web.config

<?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}&amp;id={R:2}&amp;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}&amp;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}&amp;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}&amp;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}&amp;classid={R:2}&amp;id={R:3}&amp;page={R:4}&amp;myorder={R:5}&amp;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}&amp;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}&amp;id={R:2}&amp;page={R:3}" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
        <httpRedirect enabled="false" />
    </system.webServer>
</configuration>

ninx

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;
}

htaccess:

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]

20200405  客户定制
rewrite ^/html/([a-z0-9]+)([_0-9]*).html$ /e/action/show.php?classid=113&id=$1&page=$2;

tags: 帝国cms7.5伪静态 规则 大全 帝国cms
返回顶部
推荐资讯
视频:田纪钧讲关节不痛的秘密、膝关节拉筋法
视频:田纪钧讲关节不
白露到了,你还好吗?
白露到了,你还好吗?
尿疗与断食
尿疗与断食
给风疹反复发作女孩的药方(组图)
给风疹反复发作女孩的
相关文章
栏目更新
栏目热门
  1. 帝国cms全站搜索的分页格式如何修改-流程
  2. libreoffice7的命令大全
  3. 帝国cms插件之标题生成标题图片
  4. 帝国cms插件安装模板
  5. useragent两千条,爬虫专用
  6. 帝国cms插件如何兼容gbk和utf8
  7. 帝国cms插件之迅搜
  8. 帝国cms用户上传文件名的命名规则及修改方
  9. 帝国cms7.2函数大全
  10. 帝国cms代码片段备忘录