Created
April 9, 2012 06:11
-
-
Save yangg/2341906 to your computer and use it in GitHub Desktop.
IIS Configs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<!-- | |
http://www.iis.net/download/ApplicationRequestRouting | |
http://blogs.msdn.com/b/carlosag/archive/2010/04/02/setting-up-a-reverse-proxy-using-iis-url-rewrite-and-arr.aspx | |
http://learn.iis.net/page.aspx/686/setting-http-request-headers-and-iis-server-variables/ | |
--> | |
<rules> | |
<rule name="ReverseProxyInboundRule1" stopProcessing="true"> | |
<match url="(.*)" /> | |
<action type="Rewrite" url="http://blog.uedsky.com/{R:1}" /> | |
<serverVariables> | |
<set name="HTTP_ACCEPT_ENCODING" value="" /> | |
</serverVariables> | |
</rule> | |
</rules> | |
<!-- Outbound Rewriting to fix the Links --> | |
<outboundRules> | |
<preConditions> | |
<preCondition name="ResponseIsHtml"> | |
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /> | |
</preCondition> | |
</preConditions> | |
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml"> | |
<match filterByTags="Link, A, IFrame, Script" pattern="^http://www.blogger.com/(.*)" /> | |
<action type="Rewrite" value="http://blog1.uedsky.com/{R:1}" /> | |
</rule> | |
</outboundRules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment