Web.config 文件例子

php - 如何使用web.config重写IIS UrlRewriteModule中的网页的URL?

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

    <system.webServer>

        <rewrite>

            <rules>

                <rule name="openbms" patternSyntax="ECMAScript" stopProcessing="true">

                    <match url="^(.*)$" ignoreCase="true" negate="false" />

                    <conditions logicalGrouping="MatchAll">

                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="true" negate="true" />

                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" />

                    </conditions>

                    <action type="Rewrite" url="index.php?s={R:1}" />

                </rule>

            </rules>

        </rewrite>

    </system.webServer>

</configuration>

 

 

 

文章来源:刘俊涛的博客 欢迎关注公众号、留言、评论,一起学习。

__________________________________________________________________________________

若有帮助到您,欢迎捐赠支持,您的支持是对我坚持最好的肯定(*^_^*)

posted @ 2019-12-10 10:23  刘俊涛的博客  阅读(294)  评论(0编辑  收藏  举报