[英]IIS Rewrite / Application Request Routing (ARR) Half-working
I have several rules in my rewrite, including ARR that have been working for over a year, now it's almost like the top rules in the web.config file are no longer being called in the correct order.我的重写中有几条规则,包括已经工作了一年多的 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>
As you can see, I have a separate route for /auth
that reverse-proxies to a different application designed for everything in /auth
... In this case, there are several files foo.HASH.css
and foo.HASH.js
that are actually there, the backend application is serving them, but the front end is getting the parent application (via IIS) of the /index.html
.如您所见,我有一个单独的
/auth
/auth
的所有内容设计的不同应用程序......在这种情况下,有几个文件foo.HASH.css
和foo.HASH.js
实际上,后端应用程序正在为它们提供服务,但前端正在获取/index.html
的父应用程序(通过 IIS)。
Some files are being reverse proxied correctly, others simply are not.一些文件被正确地反向代理,而另一些则没有。 It's weird, I'm not sure if it's a windows/iis update that started this or what.
这很奇怪,我不确定是 Windows/iis 更新启动了这个还是什么。
Turns out the content for the app being reverse proxied wasn't being published with the path prefix.原来被反向代理的应用程序的内容没有使用路径前缀发布。 Since browsers aren't showing the full path in the list, the aren't too load from root was missed.
由于浏览器未在列表中显示完整路径,因此未从根目录加载太多。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.