在IIS环境下部署前端应用时,可以使用以下Url重写规则:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="rule1">
                    <match url="^([\w\-\/]+)$" ignoreCase="true" />
                    <action type="Rewrite" url="index.html" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

标签: IIS, Url重写

评论已关闭