IIS重写/应用程序请求路由(ARR)半工作

问题描述 投票:0回答:1

我在重写中有几条规则,包括已经使用了一年的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.cssfoo.HASH.js实际上,后端应用程序正在为它们提供服务,但前端正在获取/index.html的父应用程序(通过IIS)。

某些文件被正确反向代理,而其他文件则没有。很奇怪,我不确定是不是Windows / iis更新启动了这个或什么。

iis url-rewriting arr
1个回答
0
投票

结果是反向发布的应用程序的内容未使用路径前缀发布。由于浏览器未在列表中显示完整路径,因此未从根目录加载太少。

© www.soinside.com 2019 - 2024. All rights reserved.