简体   繁体   English

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

[英]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.cssfoo.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.

相关问题 在IIS中部署带有ARR的signalR(应用程序请求路由) - Deploying signalR with ARR in IIS (Application Request Routing ) 应用程序请求路由(ARR)URL中的IIS 7空格 - Application Request Routing (ARR) IIS 7 Spaces in URL IIS7.5应用程序请求路由(ARR)代理到多个端口 - IIS7.5 Application Request Routing (ARR) proxy to multiple ports 通过ARR和URL重写了解iis路由 - Understanding iis routing with ARR and Url Rewrite 具有ARR(应用程序请求路由)的IdentityServer 4 - IdentityServer 4 with ARR (Application Request Routing) 如何使用 iis arr 中的基于路径的路由为运行不同 iis 服务器的 2 个应用程序在 IIS 7.0 中配置应用程序请求路由 - How to configure Application Request Routing in IIS 7.0 for 2 applications running different iis servers using path based routing in iis arr IIS:在默认网站之外使用应用程序请求路由进行URL重写 - IIS: Use Application Request Routing for URL Rewrite outside of Default Website 使用HTTP方法和Mule的应用程序请求路由(ARR) - Application Request Routing (ARR) with HTTP Methods and Mule IIS错误请求为使用ARR配置url-rewrite的站点 - IIS Bad Request for the site configured with url-rewrite with ARR 反向代理不适用于在IIS上使用ARR和URL重写的ADFS - Reverse proxy not working for ADFS using ARR and URL-Rewrite on IIS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM