web.config 1.24 KB
Newer Older
邓超's avatar
邓超 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="index.html" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />
            </files>
        </defaultDocument>
        <rewrite>
            <rules>
                <rule name="route1" stopProcessing="true">
                    <match url="\/index\.html$" ignoreCase="true" />
                    <action type="None" />
                </rule>
                <rule name="route2" stopProcessing="true">
                    <match url="." ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="\/index.html" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>