1.微软下载 URL Rewrite
2.在部署目录添加web.config文件
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Rule Root" 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="index.html的位置" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>