In my previous post I moved away from Graffiti CMS to find the perfect blog engine for me, in the journey I found BlogEngine.NET, perfect name for what I was looking for, yet I spent some time after the migration using BlogML to make sure all the urls still work, so all people that get into my blog from searching, almost all, still can find the correct post by the link. There is nothing worse than a broken link isn’t it? I made some modifications to BlogEngine.NET as a form as a extension, that is nothing else than a HttpModule.
Now Graffiti uses the category as a link and creates a directory per post if running under IIS6, I was wise when using Graffiti CMS to add all post blogs under blog, so all posts have the link of blog on the url, something that BlogEngine.NET is the post directory. So I had to make sure any request to blog will be handle by my httpmodule. Now if you are running your BlogEngine.NET under IIS6, you still need to create a directory called blog, otherwise your httpmodule won’t be called, if you are running under IIS7, you don’t have to worry about that one.
As I said before Graffiti CMS creates a directory per post blog, in BlogEngine.NET, every post is a aspx page, so modules can redirect them, that’s why my module rewrites the end of the title to .aspx.
Also a few spaces in Graffiti are converted to dashes (-) and in BlogEngine.NET some are removed, so I had to check a few URLS and removed those, instead of hard coding it as I did for the test, I am working in a XML file that I can add as many changes as I want.
Hope that helps anybody moving to BlogEngine.NET can use this idea, when I got some time to finish my real Extension with a configuration, I’ll make sure to share it here.
I got a few emails this week of people asking me, why the change to BlogEngine.NET instead of SubText, well, the answer is simple, besides http://darkfalz.com/ told me, as well as the code was very easy for me to grab that application and write the changes I wanted to make, yet I personally love the mobile theme that BlogEngine.NET has for the iPhone.