2013-07-23 40 views
1

我們正在嘗試使用ARR和URL重寫來設置反向代理機制。當目標網址是託管在同一臺服務器上的網址時,重寫工作正常。但是,當我們嘗試將其路由到外部服務器時,路由現在正在工作。我們正在下面給出的arr網址重寫不適用於外部網站

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. 

請找到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> 

回答

3

我們也有類似的問題。重寫URL到本地站點沒有問題,但是重寫到外部站點導致錯誤的網關錯誤。

我們確實有一個內部代理(您也在IE中設置的代理訪問外部網站)。在ARR反向代理頁面中設置相同的代理解決了我們的問題。