Using ManagedFusion URL Rewriter with Sitecore

Mon Feb 14 2011

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" />

Nick Wesselman

Nick Wesselman started working professionally in software development just a few days after everyone realized we dodged a bullet with the Y2k bug. He’s worked as a Sitecore solution partner, Technology partner, and now for Sitecore itself. He lives with his wife, son, and daughter in Asheville, NC.