Loading
0

emlog程序IIS7/IIS8/IIS10下web.config伪静态规则

技术小学生微信公众号
腾讯云服务器大促销。
华为服务器
emlog程序IIS7/IIS8/IIS10下web.config伪静态规则将如下规则保存到web.config文件中,并放到网站根目录下,如已经存在有web.config文件,则只需要把<rewrite></rewrite>及中间内容复制放到<system.webServer>下面

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="emlogRule 1">
                    <match url="^(post[-]record[-]sort[-]author[-]page)-([0-9]+).html$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php?{R:1}={R:2}" appendQueryString="false" />
                </rule>
                <rule name="emlogRule 2">
                    <match url="^tag-(.+).html$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?tag={R:1}" appendQueryString="false" />
                </rule>
                <rule name="emlogRule 3">
                    <match url="^t/page-([0-9]+).html$" ignoreCase="false" />
                    <action type="Rewrite" url="t/index.php?page={R:1}" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

技术小学生微信公众号
华为服务器
腾讯云服务器大促销。

声明:站长码字很辛苦啊,转载时请保留本声明及附带文章链接:https://blog.tag.gg/showinfo-8-35976-0.html
亲爱的:若该文章解决了您的问题,可否收藏+评论+分享呢?
上一篇:thinkphp及typecho博客程序IIS7/IIS8/web.config伪静态规则
下一篇:phpcms程序IIS7/IIS8/IIS10web.config伪静态规则