Using ManagedFusion URL Rewriter with Sitecore

Posted 02/14/2011 by techphoria414

Posted in

Perhaps a rare combination, but we recently encountered a project which required use of the Reverse Proxy functionality of the ManagedFusion Url Rewriter module. To play nice with Sitecore, you need to add a simple processor to the Sitecore HTTP Request pipeline. Read on for the code.

This HttpRequestProcessor checks for the presense of an HTTP Context item added by the Url Rewriter module when it's executing a reverse proxy. It simply aborts Sitecore processing of the request if it is found.

/// <summary>
/// Allows requests which the Rewriter module is proxying to pass on through Sitecore
/// </summary>
public class AbortProxiedRequest : HttpRequestProcessor

override void Process( HttpRequestArgs args)
    if (args.Context.Items.Contains( "ManagedFusion.Rewriter.ProxyHandler" ))


And then in the Web.config, early within the httpRequestBegin pipeline:

<processor type="My.Namespace.AbortProxiedRequest, My.Assembly" />