TikiWiki Podcasts

iTunes silly media filter solved for TikiWiki RSS links

I finally managed to get TikiWiki, CVS, and Elizabeth's code changes loaded. Studying the iTunes technical specification, I realized that the problem Elizabeth ran into might be quite simple. The iTunes specification says:

The URL before the GET-style form values (before the first ?) must end in a media file extension (e.g. mp3). To work around this, the feed provider can alter their URL from this:
to this:
Notice how it says load.mp3 instead of load.php. It should be possible to accomplish this via various means, such as web server rewrites. iTunes looks at the extension of the path part of the url, i.e. the part before the"?".

Now the example changed both the part before the ? And the part after the ? to end in .mp3, but the text implies that only the part before the ? matters. "If" the text is true, then this can be easily accomplished with an Apache rewrite rule; well we might be able to rewrite both portions. Something like this:
  • Published Podcast URL: http://tikiwiki.org/tiki-download_file.mp3?fileId=9.mp3
  • Rewritten URL for tiki: http://tikiwiki.org/tiki-download_file.php?fileId=9

Enabling apache mod_rewrite on debain
a2enmod rewrite
Creates a symlink in /etc/apache2/mods-enabled from mods-available/rewrite.load
/etc/init.d/apache2 stop
/etc/init.d/apache2 start

Add to the virtual server in the section for the wiki document root:
RewriteEngine on
RewriteRule ^tiki-download_file\.mp3$ tiki-download_file.php


Now the podcast xml file needs to refer to the tiki-download_file.mp3?fileId=xx in the sections.