WPMU Update – mod_rewrite fix for digits in URLs

Here’s a small fix to fix a big mod_rewrite rules bug. URLs like this, http://blogs.linux.ie/xeer/2005/01/06/2004-indian-ocean-earthquake-wikipedia/, won’t load properly as mod_rewrite gets confused between the date of the post and the year in the title. Here’s a quick fix:
Open the .htaccess file in your root directory and replace each occurance of ^(.*) with ^([_0-9a-z-]+)
Thanks to Kae and Darragh for spotting that.
The latest CVS update broke post editing a bit, an extra field was added. Here’s how to update your blog if you’re using it:
cd wp-inst/wp-content/blogs; for i in *; do echo "ALTER TABLE wp_"$i"_posts ADD menu_order INT( 11 ) DEFAULT '0' NOT NULL" | mysql wpdb ;done

Author: Donncha

Donncha Ó Caoimh is a software developer at Automattic and WordPress plugin developer. He posts photos at In Photos and can also be found on Google+ and Twitter.

Leave a Reply