I maybe broke my website?

Apr. 29, 2009 | Tweet | | 2 Comments

I’m trying to turn this site from an aimless, self-indulgent blog (redundant?), into what I originally wanted it to be: a place where I get shit done.

Step One was to move this roll of bellyaching and soft points off the front page and into /blog, where it rightfully belongs.

But I wanted to do it without breaking my precious, precious Google PageRank (of approximately zero), so I need to append my .htaccess file to redirect all my old blog links to my new blog home. Here’s how I think it’s supposed to go:

redirect 301 /2009/(.*)$1 /blog/2009/$1

Or something like that. Problem is it’s not working. Luckily, in the meantime, all my old links still work. I wonder how long that will last?

Comments

2 Responses to “I maybe broke my website?”

  1. Edwin Horneij says:

    I think the redirect directive requires a fully qualified URL for the destination. I think it’s meant for sending a visitor to a different domain. Try mod_rewrite:

    RewriteEngine On
    RewriteRule ^(\d{4})/(.*) /blog/$1/$2 [R]

  2. Tim says:

    Ed, you are a savior! You’ll also notice it’s been three years and I still haven’t figured out regex.