Oct 15 2008

Supporting Community Server urls in BlogEngine.Net

Category: .Net | Applications | My SoftwareRory Primrose @ 08:23

One of the parts of my migration from CS to BlogEngine.Net was to continue support for CS url formats. Primarily, this is because I have lots of Google traffic and people who are subscribed to syndication feeds on those urls. Writing an http module was the easiest way to provide support for these existing urls.

I have released the first version of this module which is being used on this site currently. You can get the binaries and source from the CodePlex project here.

The following are the release notes which are also found in the comments in the code:

Neovolve.BlogEngine.Net.Web 1.0 contains a redirector module that translates Community Server url formats into BlogEngine.Net urls. This module will redirect Community Server pages, posts, month post lists, day post lists, tags, syndication and tagged syndication urls to the most appropriate location in BlogEngine.Net. BlogEngine.Net relies on its own friendly written urls when the urls are processed. This module cannot rewrite Community Server urls as BlogEngine.Net will not be able to understand what the requested resource is. The module must redirect requests to the equivalent BlogEngine.Net friendly url so that BlogEngine.Net url writing can occur such that resources are resolved correctly.

In Community Server, tags and categories are the same thing and it supports tag filtering by allowing multiple tags to be defined. BlogEngine.Net supports both tags and categories as separate entities and has a concept of a category hierarchy, but doesn't support tag filtering. When a Community Server url is encountered where multiple tags are defined, the first Community Server tag in the url that can be matched to either a BlogEngine.Net category or tag will be the resource used to response to the client request. Preference is given to categories over tags.

To use this module, put the release binary into your bin directory and add the following to the httpModules section in web.config.

<add name="CSUrlRewrite" type="Neovolve.BlogEngine.Web.CSUrlRedirector, Neovolve.BlogEngine.Web"/>

Download from here.

Tags:

Comments (1) -

1.
Steve Trefethen Steve Trefethen United States says:

Thanks for the info, I'm looking at moving from dasBlog to BlogEngine.Net and this is the single largest issue keeping me from making the switch. I'm hoping to modify your solution to work with dasblog (when I get a free minute that is...)

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading