[英]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.css
和foo.HASH.js
實際上,后端應用程序正在為它們提供服務,但前端正在獲取/index.html
的父應用程序(通過 IIS)。
一些文件被正確地反向代理,而另一些則沒有。 這很奇怪,我不確定是 Windows/iis 更新啟動了這個還是什么。
原來被反向代理的應用程序的內容沒有使用路徑前綴發布。 由於瀏覽器未在列表中顯示完整路徑,因此未從根目錄加載太多。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.