iis相同WebSite
frontEnd 與 backEnd 架於相同WebSite,遇到backEnd 的url rewriting , 在frondend 的url rewriting
Reverse Proxy :
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="ReverseProxyInboundRule1" enabled="true" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://localhost:port/{R:1}" />
</rule>
</rules>
<outboundRules>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
BackEnd :
<system.webServer>
<rewrite>
<rules>
<remove name="ReverseProxyInboundRule1" /> //移除 frond end rule
</rules>
</rewrite>
</system.webServer>