iview发布到IIS 路由问题

<?xml version="1.0" encoding="UTF-8"?> 
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="API Rule" stopProcessing="true">
<match url="^(api|account|manage)(.*)$" />
<action type="None" />
</rule>
<rule name="Angular Rule" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

1、安装 url rewrite模块到IIS( https://www.iis.net/downloads/microsoft/url-rewrite)

2、然后在web.config文件中添加上面的配置

原文地址:https://www.cnblogs.com/souphm/p/10870260.html