Changing Hosts the hard way

In case you’re wondering where this blog dissappeared to today (and i knowyou weren’t), I finally got tired enough of dealing with PHP 4/IIS/the lack of REQUEST_URI that i changed hosts. Thusly, the CNAME record for this blog dissappeared for a few hours.

The main reason i switched was that i wanted was to be able to move wordpress into the top level directory, from /blog/. so i figured i’d try and do it all in one fell swoop. what’s more fun than trying to do something “mission critical” in a language you’ve just learned? so here’s what i added to my .htaccess file:

<IfModule mod_rewrite.c>
RedirectMatch 301 /blog/index.php/(.*) /blog/$1
RedirectMatch 301 /blog/wp-content/(.*) /wp-content/$1

the first line is for old URL’s. the second line is for anything i uploaded and referenced in a post (especially images). so far both seem to be working. (i found the RedirectMatch example on this page). And, since you’re reading this, the CNAME record seems to have been set up, although i had to file a support ticket for that.

UPDATE: i forgot that i’d also added a prefix to my permalink structure (/blog/) so my redirects were all failing. should be fixed now (code updated)