Press "Enter" to skip to content

Why I got into journalism

Hint: at the time it probably had something to do with telling stories.

This comes to mind as I spent the week moving the paper’s blogs from the LifeType platform to WordPress Multiple User (WPMU) the same platform that powers wordpress.com. The project was a whole lot of fun as we had to figure a way to export all of the users, posts and comments from 20 blogs. Did I mention that LifeType does not include a simple export feature?  In the end we found a sample script that sort of worked and had a freelance developer customize it to go Lifetype-to-WPMU. It still involved a fair amount of exporting and importing SQL files, but the heavy lifting was all scripted as part of the WordPress import feature.

The nail in the coffin on the project was trying to redirect the correct URLs for every blog and post from old to new. Considering that our Lifetype setup was fond of underscores and SEO and WP dictate that hyphens are preferred, some mod_rewrite was called for.

Not being a developer and not knowing much about mod_rewrite – it took me about 12 hours to finally find a combination that worked. So – this is why I am in journalism now – finding solutions, learning new things, and telling stories.

Here is the code – it is the “good enough” solution. But, any programmer would probably tell you it could have been solved in about half the lines:

#
# Rewrite old permalinks to new location
# FROM: /web_notes/2008/07/28/more_on_comments/
# TO: /webnotes/2008/07/28/more-on-comments/
#
RewriteRule (.*)/(.*)_(.*)_(.*)_(.*)_(.*)_(.*)_(.*)_(.*)$ http://blogs.nashuatelegraph.com/$1/$2-$3-$4-$5-$6-$7-$8-$9 [R=301,L]
RewriteRule (.*)/(.*)_(.*)_(.*)_(.*)_(.*)_(.*)_(.*)$ http://blogs.nashuatelegraph.com/$1/$2-$3-$4-$5-$6-$7-$8 [R=301,L]
RewriteRule (.*)/(.*)_(.*)_(.*)_(.*)_(.*)_(.*)$ http://blogs.nashuatelegraph.com/$1/$2-$3-$4-$5-$6-$7 [R=301,L]
RewriteRule (.*)/(.*)_(.*)_(.*)_(.*)_(.*)$ http://blogs.nashuatelegraph.com/$1/$2-$3-$4-$5-$6 [R=301,L]
RewriteRule (.*)/(.*)_(.*)_(.*)_(.*)$ http://blogs.nashuatelegraph.com/$1/$2-$3-$4-$5 [R=301,L]
RewriteRule (.*)/(.*)_(.*)_(.*)$ http://blogs.nashuatelegraph.com/$1/$2-$3-$4 [R=301,L]
RewriteRule (.*)/(.*)_(.*)$ http://blogs.nashuatelegraph.com/$1/$2-$3 [R=301,L]
RewriteRule ^(((.*)_(.*))(?!wp-b))/(dddd/dd/dd)/(.*)   http://blogs.nashuatelegraph.com/$3$4/$5/$6 [R=301,L]
RewriteRule ^(((.*)_(.*))(?!wp-b))/ http://blogs.nashuatelegraph.com/$3$4/ [R=301,L]

4 Comments

  1. Grant Morris
    Grant Morris August 30, 2008

    I got into journalism for the same reason everyone did. Money, power, women, and social adoration.

    It’s working out pretty well for me so far haha.

  2. Grant Morris
    Grant Morris August 29, 2008

    I got into journalism for the same reason everyone did. Money, power, women, and social adoration.

    It’s working out pretty well for me so far haha.

  3. Anonymous
    Anonymous August 30, 2008

    Grant – one out of 4 is not bad. And of course I mean the money.

  4. Damon
    Damon August 29, 2008

    Grant – one out of 4 is not bad. And of course I mean the money.

Comments are closed.