Wordpress RSS Feeds

IT Chapters No Comments »

Wordpress is a great blogging tool. Since moving from Movable Type I have never looked back. For one thing comment spam has dropped from about 50 a day to about 1 per week.

However there is (now was :P) a niggly little problem with wordpress. Because the RSS feeds for each blog are generated on the fly, there are no physical RSS feed files (e.g. atom.xml, index.rdf). Therefore when GoogleBot or Yahoo! Slurp came along requesting these files, the server responded with a 404 error saying that the files didn’t exist.

The way Wordpress handles RSS is via a PHP file called wp-feed.php. If you need a feed to be generated you pass this script a variable such as “atom” or “rdf” and it generates the appropriate XML file and returns it to the computer requesting it. This is perfectly acceptable except in the case of search engines (i.e. I need to be indexed more!).

I decided to search :P Google a bit to see if anyone else had realised the problem and found a great solution which strangely enough follows on from my previous post about mod_rewrite.

The link for the post that I found is here. With two URL rewrite rules, Apache automatically causes the wp-feed.php script to be run and pass back the correct XML feed. Instant gratification. Thanks CrazeeGeek!

Can’t Sleep

Life in London, Today.... 2 Comments »

Dammit………………………………….