Я сделал следующие шаги:
http://localhost
)Add Rule(s)...
Reverse Proxy
google.com
как сервер, на который будут пересылаться HTTP-запросыEnable SSL Offloading
OK
Когда я получаю доступ http://localhost
У меня все еще есть собственное веб-приложение, а не 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>
И все равно не работает.