URL重写到不在IIS 8.5上工作但不适用于IIS 7.5的外部网站

时间:2015-10-02 22:20:01

标签: iis url-rewriting iis-7.5

$(".choices input:radio").on("click", function () {
    alert('test');
});

基本上,我想将<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

以上规则适用于具有IIS7.5版本的Windows 7系统。但它不适用于带有IIS8.5的Windows 8.1系统。它给出了通用的404.4错误。

我确保在两个系统上都安装了URL Rewrite模块和Application Request Routing模块。什么可能是错误的猜测?

1 个答案:

答案 0 :(得分:0)

我错过了一件傻事。

确保选择了根节点。应用程序请求路由&gt;服务器代理设置(右窗格)&gt;启用&gt;应用

就是这样。在Windows 7和IIS 7.5上也需要这样做。我已经这样做了,忘了在IIS8.5上做同样的事情。

相关问题