Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Robert Rawson 13 posts 33 karma points
    Jan 19, 2012 @ 14:02
    Robert Rawson
    0

    URL Rewrite and reverse proxy

    I have an Umbraco site eg www.domain.com.  I want to setup a reverse Proxy to mask a wordpress blog at www.wpblog.com so that it appears at www.domain.com/blog/.

     

    I have created a test non-umbraco application to test this theory and it works perfectly using the following code from iis.net.  If i put the first rewrite rule into my umbraco web.config it works (bug clicking on links produces a 404) but as soon as i add the outbound rules the whole site just goes blank without any error codes.

    <rewrite>
        <rules>
            <rule name="Reverse Proxy to blog" stopProcessing="true">
                <match url="^blog/(.*)" />
                <action type="Rewrite" url="http://www.wpblog/{R:1}" />
            </rule>
     
        </rules>
        <outboundRules>
            <rule name="Add application prefix" preCondition="IsHTML">
                <match filterByTags="A" pattern="^/(.*)" />
                <conditions>
                    <add input="{URL}" pattern="^/(blog)/.*" />
                </conditions>
                <action type="Rewrite" value="/{C:1}/{R:1}" />
            </rule>
            <preConditions>
                <preCondition name="IsHTML">
                    <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                </preCondition>
            </preConditions>
        </outboundRules>
    </rewrite>

     

    Any help would be much appreciated.

  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Jan 25, 2012 @ 10:21
    Tim
    0

    Try setting Umbraco to ignore the /blog/ directory. Open up your web.config and look for the umbracoReservedPaths app setting. Add your blog folder to the value for the setting (separated by a comma from the previous entry, and see if that solves the issue at all.

  • Robert Rawson 13 posts 33 karma points
    Aug 28, 2012 @ 15:28
    Robert Rawson
    0

    Just to let you know, the solution to this was to disable GZip compression on both sites and allow the path as an umbracoreservedpath

     

    thanks

Please Sign in or register to post replies

Write your reply to:

Draft