Maintaining PermaLinks when moving from .Text to DasBlog (original) (raw)

I believe very strongly in the concept of the PermaLink. They aren't TempLinks, they are meant to be as permanent as possible. When people want their hair done, they get perms, not temps.

When I moved this blog from Radio Userland back in September of 2003, I was worried that my 17 readers at the time wouldn't find the new blog. So, using Clemens' schema, I maintained my permalinks (mostly) via a funky redirect mechanism. If you should still find some old Radio urls and schmutz from my old blog, you'll be redirected to the old content that was imported here.

I've seen a number of folks migrate their content from .Text to DasBlog and there's a half-dozen utilities to do it, it's not too hard. What is more difficult/tricky is maintaining your old permalinks. Joshua Flanagan has contributed some stuff to the DasBlog project recently (that we'll make public later) but he also made some changes to the default web.config that can help folks maintain their URLs.

DasBlog has a very flexible RegularExpression-based URL Mapper (again, there's lots out there, not just DasBlog's) that will allow you to add matches, take them apart, and reassemble the results. Here's two for mapping .Text URLs to DasBlog. The end result is that requests for your old (non-existent) .Text pages are redirected to DasBlog.

This one should be used if you didn't use the old .Text PostID as the permalink GUID in DasBlog, so it's date-based. This is what Joshua added. Note that you'll likely already have the "<newtelligence.DasBlog.UrlMapper>" section, so just add the element. Note also that I've split the regex up for formatting purposes, but the matchExpression should have NO whitespace.

<newtelligence.DasBlog.UrlMapper>

</newtelligence.DasBlog.UrlMapper>

This one should be used if you DID use the old .Text PostID as the permalink GUID in DasBlog, which is my preferred mechanism. The GUIDs in DasBlog just need to be unique, and in this case we can toss the date info in the URL.

<newtelligence.DasBlog.UrlMapper>

</newtelligence.DasBlog.UrlMapper>

You can shape you URLs anyway you like. Maybe you brought your Radio content over like Jeff Sandquist, or if you've migrated content from other (homegrown) blogs to DasBlog.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About Newsletter

Hosting By
Hosted on Linux using .NET in an Azure App Service