我在重写中有几条规则,包括已经使用了一年的ARR,现在几乎就像不再以正确的顺序调用web.config文件中的最高规则。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="AuthRoute" stopProcessing="true">
<match url="(auth$|auth/(.*))" />
<action type="Rewrite" url="http://localhost:8083/auth/{R:2}" />
</rule>
...
<rule name="Non-File Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
您可以看到,/auth
有一条单独的路由,可以反向代理到为/auth
中的所有内容设计的另一个应用程序...在这种情况下,有几个文件foo.HASH.css
和foo.HASH.js
实际上,后端应用程序正在为它们提供服务,但前端正在获取/index.html
的父应用程序(通过IIS)。
某些文件被正确反向代理,而其他文件则没有。很奇怪,我不确定是不是Windows / iis更新启动了这个或什么。
结果是反向发布的应用程序的内容未使用路径前缀发布。由于浏览器未在列表中显示完整路径,因此未从根目录加载太少。