簡體   English   中英

URL重寫到外部網站不能在IIS 8.5上運行,但可以在IIS 7.5上運行

[英]URL Rewrite to external website not working on IIS 8.5 but works on IIS 7.5

<rule name="Reverse Proxy to externalwebsite.com" stopProcessing="true">
  <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  </conditions>
  <match url="/(.*).cgi" />
  <action type="Rewrite" url="http://externalwebsite.com/cgi_bin/{R:0}" logRewrittenUrl="true" />
  <serverVariables>
    <set name="HTTP_REFERER" value="http://externalwebsite.com" />
  </serverVariables>
</rule>

基本上,我想將對internalwebsite.com/cgi_bin/*.cgi所有請求重寫為externalwebsite.com/cgi_bin/*.cgi

上面的規則在帶有IIS7.5版本的Windows 7系統上可以完美地工作。 但是它在帶有IIS8.5的Windows 8.1系統上不起作用。 它給出了通用404.4錯誤。

我確保在兩個系統上都安裝了URL重寫模塊和應用程序請求路由模塊。 關於什么可能是錯誤的任何猜測?

我錯過了一個愚蠢的事情。

確保已選擇根節點。 應用程序請求路由>服務器代理設置(右窗格)>啟用>應用。

而已。 Windows 7和IIS 7.5也是必需的。 我這樣做了,但是忘記在IIS8.5上做同樣的事情。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM