繁体   English   中英

HTTP 错误 404.4 - 未找到 - URL 重写 - IIS Express

[英]HTTP Error 404.4 - Not Found - URL Rewrite - IIS Express

我正在使用 ASP.NET MVC + AngularJS 构建一个应用程序。 现在通过 AngularJS 进行 API 调用,我使用 URL 重写,因为 API 托管在不同的服务器上。

但它给了我 404.4 错误。 我检查了请求的跟踪,并且模式匹配得很好。 它正在尝试重写服务器 url,但随后出现 404.4 错误。

我还在我的 web.config 中添加了。 我的重写规则如下:

<rewrite>
      <allowedServerVariables>
        <add name="HTTP_Authorization"/>
      </allowedServerVariables>
      <rules>
        <rule name="Api Call" stopProcessing="true">
          <match url="quote/(.*)" />
          <action type="Rewrite" url="http://<server>/pc/service/edge/quote/{R:1}" appendQueryString="false" />
          <serverVariables>
            <set name="HTTP_Authorization" value="Basic <key>" />
          </serverVariables>
          <conditions logicalGrouping="MatchAny">
            <add input="{REQUEST_URI}" pattern="quote/(.*)" />
          </conditions>
        </rule>
      </rules>
</rewrite>

网址重写 40​​0.4 错误

我究竟做错了什么?

请帮忙。 先感谢您。

  1. 您需要安装 IIS 应用程序请求路由:访问https://www.iis.net/downloads/microsoft/application-request-routing
  2. 选中位于应用程序请求路由功能视图中的“启用代理”复选框是 IIS 管理器在此处输入图像描述

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM