arr url重写不适用于外部网站

use*_*662 3 iis url rewrite arr

我们正在尝试使用ARR和URL Rewrite设置反向代理机制.当目标URL是托管在同一服务器中的URL时,重写工作正常.但是当我们尝试将其路由到外部服务器时,路由正在运行.我们正在接受

HTTP Error 502.3 - Bad Gateway
The operation timed out 

Module ApplicationRequestRouting 
Notification ExecuteRequestHandler 
Handler ApplicationRequestRoutingHandler 
Error Code 0x80072ee2 
Requested URL http://localhost:8882/ff 
Physical Path D:\pocwebsites\exposed\ff 
Logon Method Anonymous 
Logon User Anonymous 


•The CGI application did not return a valid set of HTTP errors.
•A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.

•Use DebugDiag to troubleshoot the CGI application.
•Determine if a proxy or gateway is responsible for this error.
Run Code Online (Sandbox Code Playgroud)

请找到下面给出的web.config文件,

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
    <rewrite>
        <rules>
        <rule name="or_rule_1" enabled="true">
            <match url=".*" />
            <action type="Rewrite" url="http://www.cnn.com" />
        </rule>
        </rules>
    </rewrite>
    </system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)

Git*_*ter 5

我们遇到了类似的问题.将URL重写到本地站点没有问题,但重写到外部站点会导致错误的网关错误.

我们有一个内部代理(您也在IE中设置的代理访问外部网站).在ARR反向代理页面中设置此相同代理解决了我们的问题.

  • 您能解释一下解决这个问题的更多信息吗? (2认同)