mod_rewrite is deep magic

When I moved this blog from MovableType to WordPress, the rss feed urls changed. Since I didn’t want the livejournal syndication to break, I put in mod_rewrite RewriteRules to redirect those feed urls. When I upgraded to WordPress 2.0, what had been an extremely long .htaccess became just a few lines long, and all the fancy stuff that they used to do in .htaccess with mod_rewrite are now evidently done in index.php itself. So I’m trying to figure out how to insert new RewriteRules to do what I did before, but everything I try either does nothing, or it causes the whole blog to break with a message in the error.log file saying “mod_rewrite: maximum number of internal redirects reached. Assuming configuration error.”

Here is the existing .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blogs/pt/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blogs/pt/index.php
</IfModule>

I would have thought that adding the following would be sufficient:

RewriteRule index.rdf /blogs/pt/feed/
RewriteRule index.xml /blogs/pt/feed/

or possibly, since /feed/ is evidently going to be passed to index.php as arguments, like this:

RewriteRule index.rdf /blogs/pt/index.php?&feed
RewriteRule index.xml /blogs/pt/index.php?&feed

I also tried with [L] and/or [R] conditions. No luck.

I’d like to get all those syndicators working again. If you have any suggestions, please leave a comment or drop me an email.

Getting there

When the Google Maps API was announced, David Megginson publically challenged me and other programmers to come up with a decent flight planning application that used it. Well, it’s not here yet, but RunwayFinder – a flight planning tool for pilots is getting closer. At least it’s a decent substitute for the “Nearest Airports” search in AirNav – you put in an airport id and it shows the ones in the neighbourhood as well.