thinkphp5在iis7下隱藏index.php

在根目錄下建立 web.config 文件php

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
        <rules>
            <rule name="OpenSourceBMS" 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>
相關文章
相關標籤/搜索