我做了以下步骤:
http://localhost
访问它) Add Rule(s)...
Reverse Proxy
google.com
作为服务器,HTTP请求将被发送 Enable SSL Offloading
OK
当我访问http://localhost
我仍然拥有自己的webapp,而不是google.com
。 在我的web.config
有:
<rewrite> <rules> <rule name="ReverseProxyInboundRule1" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{CACHE_URL}" pattern="^(https?)://" /> </conditions> <action type="Rewrite" url="{C:1}://google.com/{R:1}" /> </rule> </rules> </rewrite>
然后,我尝试添加更有用的规则:将localhost/google/sth
重写为google.com/search?q=sth
。 我改变了web.config
:
<rewrite> <rules> <rule name="ReverseProxyInboundRule1" stopProcessing="true"> <match url="^google/(.*)" /> <conditions> <add input="{CACHE_URL}" pattern="^(https?)://" /> </conditions> <action type="Rewrite" url="{C:1}://google.com/search?q={R:1}" /> </rule> </rules> </rewrite>
而且它仍然不起作用。