星联网络专注帝国CMS二次功能插件开发-精品网站模板站长代码素材

  • 最近更新
  • 模板:33
  • 记录:12640|
  • 插件:52|
  • 工具:4|
  • 代码:8|
  • 评论:0

帝国cms伪静态设置方法以及apache - iis nginx环境伪静态规则

前言

帝国cmsIIS伪静态规则&l;?xmlvesio=&quo;1.0&quo;ecodig=&quo;UTF-8&quo;?&g; &l;cofiguaio&g; &l;sysem.webSeve&g; &l;hpEoseoMode=&quo;DeailedLocalOly&quo;&g;


帝国cms IIS伪静态规则
<?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>
帝国cms Apache环境伪静态规则
#栏目
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/)
RewriteRule ^([0-9a-zA-Z/]+)/(|index\.html|index_[0-9]+\.html)$ /e/action/list\.php\?classid=$1&page=$2
#内容
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/)
RewriteRule ^([0-9a-zA-Z/]+)/([0-9a-zA-Z]+)([_0-9]*)\.html$ /e/action/show\.php\?classid=$1&id=$2&page=$3

提示:在原来的伪静态规则 的 基础上 加上 上面两段
帝国cms Nginx伪静态规则
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;
}

请输入密码后继续:

  • 扫描二维码关注微信公众号
    回复星联下载网获取下载密码

  • 本网刊登的文章均仅代表作者个人观点,并不代表本网立场。文中的论述和观点,敬请读者注意判断。

    本文地址:http://www.xlkjgs.com/notes/ecms/12116.html

    以上内容由本站整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!

    星联网络

    星联网络是中国最具实战的互联网创业者的知识服务商,这里有互联网行业动态,网络推广,SEO优化,SEM优化,ESC配置,行业经验分型,互联网项目,微信营销、淘宝客赚钱、新媒体营销、京东运营、跨境电商等众多互联网营销知识分享

    站长运营站长必备网站运营之道才能长久发展