Archive for the 'Wordpress' Category

mod_rewrite Woes

Tuesday, May 3rd, 2005

I thought I’d solved my problems enabling mod_rewrite to give me more attractive looking permalinks for my posts when I made this support forum post last night.

They were working when I posted that. This morning they’re broken.

Now I vaguely remember “tidying up” some configuration files to remove any accidental damage caused by my tinkering - clearly I changed something significant without noticing. Of course I didn’t do the intelligent thing and log all of my changes.

Still, half the fun of something like this is the learning you’re forced to do as you wrestle with getting it to work. I think I’m due another lesson.

UPDATE: found the culprit: /etc/apache2/default-server.conf

The options set here apply to all virtual hosts - and override the defaults set in httpd.conf

One quick edit to enable:

Options FollowSymLinks
AllowOverride All

and everything’s working again.

Kiss ^M Goodbye

Monday, May 2nd, 2005

I accidentally marked one of my own comments as spam - and then discovered that Wordpress by default does not allow easy editing of anything flagged as such.

The mass delete plugin adds an easy to use “unmark as spam option” (as well as a way to purge your database of old comments marked as spam). Unfortunately, for me, the script did not work at first because of the way Windows, Linux and Mac OS all use different control characters to mark the end of a line.

tr is one of those handy little unix utilities that makes it unix/linux such a joy to work on. This little one-liner converts cjd_delete.php to a format that plays nice with unix.
tr '\r' '\n' < cjd_delete.php > cjd_delete.php.unix

Now just rename the new file and you’re ready to roll:
mv cjd_delete.php.unix cjd_delete.php