簡體   English   中英

IIS 重寫/應用程序請求路由 (ARR) 半工作

[英]IIS Rewrite / Application Request Routing (ARR) Half-working

我的重寫中有幾條規則,包括已經工作了一年多的 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 更新啟動了這個還是什么。

原來被反向代理的應用程序的內容沒有使用路徑前綴發布。 由於瀏覽器未在列表中顯示完整路徑,因此未從根目錄加載太多。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM