Loading
0

thinkphp及typecho博客程序IIS7/IIS8/web.config伪静态规则

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

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="thinkphp" stopProcessing="true">
                    <match url="^(.*)$" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{HTTP_HOST}" pattern="^(.*)$" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

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

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