Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

reverse proxy web.config example

By: a guest on Oct 27th, 2012  |  syntax: XML  |  size: 0.90 KB  |  hits: 96  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3.     <system.webServer>
  4.         <rewrite>
  5.             <rules>
  6.                 <remove name="ReverseProxyInboundRule1" />
  7.                 <rule name="ReverseProxyInboundRule1" stopProcessing="true">
  8.                     <match url="(.*)" />
  9.                     <action type="Rewrite" url="http://192.168.1.5:81/gui/{R:1}" />
  10.                 </rule>
  11.             </rules>
  12.             <outboundRules>
  13.                 <remove name="ReverseProxyOutboundRule1" />
  14.                 <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
  15.                     <match filterByTags="A, Form, Img" pattern="^http(s)?://192.168.1.5:81/gui/(.*)" />
  16.                     <action type="Rewrite" value="http{R:1}://DOMAIN-OR-IP-HERE/{R:2}" />
  17.                 </rule>
  18.             </outboundRules>
  19.         </rewrite>
  20.     </system.webServer>
  21. </configuration>