Migrating to WordPress with URL Rewriting

Recently I switched from using SubText to WordPress as my blog engine. The reason for the switch was to get access to all of the plug ins available, I could have added the functionality, but unfortunately I find myself a bit time starved as of late.

In order to prevent all of my old permalinks links from breaking, while moving from a /year/month/day/postname format to simply having postname as the url, I am using IIS7’s URL Rewriting Module. It turned out to be quite simple to do this, and here are the entries that change the requests to the new Url Scheme:

<rule name="Aspx" enabled="false" stopProcessing="true">
<match url="archive/[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/([A-Za-z0-9-_.]+).aspx" />
<conditions logicalGrouping="MatchAny" />
<action type="Redirect" url="http://seanlynch.io/{R:1}" />
<rule name="Rss" enabled="false" stopProcessing="true">
<match url="rss.aspx" />
<conditions logicalGrouping="MatchAny" />
<action type="Redirect" url="/feed" redirectType="Permanent" />

This has been working well, the only issue that I have run into so far is that categories in subtext were marked with numbers by default, and google’s crawler is finding them as broken links. I haven’t decided how to handle these links yet.

.Net based SVN client library

As an exercise to figure out socket programming I have been messing around with creating an SVN client library to use with DevExamples.com, well actually a generic SC client library that would allow me to change what repository site I was working against, SVN just seemed like the simplest of them at the moment.

However, after thinking about it, I think it would be better to use one that is already built if possible. I just have not been able to find a pure .Net client library. It is also seems rare for a source control library to work without a working folder, which is somewhat limiting when I want to check the propagation of examples using this method on the same machine.

Though I think it would be interesting to write a LINQ to Source provider, as a way to learn expression trees better. Plus it would be nice to be able to not only easily switch hosting providers (the reason I am looking for a pure .Net library) but also to have a standard syntax to allow me to easily switch from SVN to SourceGear’s Vault (which I use for my personal development projects) to TFS (which we use at work) as the storage system for the examples.

Though SvnBridge could possibly help with that too.

Technorati Tags: ,,,

A few simple MVC control suggestions

I finally got around to updating the website to the MVC preview 2, and ran into a couple of things.

  1. TagBuilder being internal. While the implementation of it CreateInputTag, CreateTag and CreateAttributeList. The removal of .ToAttributeList() was actually what made me go looking for this. The HtmlExtensionUtility extension methods would have been nice to have also.

    I guess a better way to say it is it would be nice not to have to reimplement the functionality that CreateAttributeList and ConvertObjectToAttributeList already implement.

  2. It would be nice if SimpleForm inherited from a class, that could be subclassed to make Div and Span tags that have attributes based on routing information.

    Admittedly it is a rather simple to implement what I am talking about but I think it would be nice to have already there.


I’m still rummaging through the routing stuff, so don’t have to much input on those it at the moment. But it looks like I will be able to take all the category discovery information out of my controllers, and just have it passed into the action, which will be nice.

On a side note, after looking at the classes that were made into base classes. I cant really say that I would ever have a need for them to be interfaces. As I can’t think of any other class I would want to tack their functionality onto, after all interfaces were the answer to not having multiple inheritance (I still wish I had it multi-inheritance though).

I do however hope that IRouteHandler stays an interface though, because I can see myself taking that behavior onto an object. Just not sure where.

Technorati Tags:

Committing to subtext, blog/domain aliases

Well, I got my first major feature for Subtext done, blog/domain aliases for the blog, but I find myself hesitant to click commit. Its not that I doubt it works, it is currently running on my blog right now. I just don’t feel comfortable checking in code that I can’t respond to problems with for about 19 hours, and would hate to really foobar stuff so soon after getting commit access ;).

After I do check it in, something along the lines this will be showing in the host admin:

This works a lot like the www prefix currently does.

So I’ve decided to wait till tomorrow after work to commit. Will likely type of some what I learned type of post too, mostly to get in the habit.