It seems that the company I’m working on has blocked http://media.libsyn.com. They have categorized it as entertaiment/radio so I cannot access the podcasts from Java Posse at work. I’m sync my iPod with the ITunes at work so I cannot hear them anymore. Because I’m not happy with the situation I tried to overcome the blocking using my connection at home, so after googling a little bit I found PHP Proxy that allows to access other sites throught it. So I installed at home and now I point my iTunes to retrieve the javaposse feed through it.
But I didn’t work off the shelf. It’s designed to work with web pages only so I had to tweak it a little bit:
- Add ‘text/xml’ and ‘application/xml’ to list of Content-Type’s that PHP Proxy is able to understand
- Add the tag to the list of “rewritten” tags.
- Append the original file extension of the url to the rewritten links so iTunes can identify the the link as a playable podcast.
- Use Apache 2.0 mod_rewrite to rewrite requests to index.php.xxxx back to index.php
The weird thing is that iTunes wouldn’t recognize a link like this one
as a playable episode even when the content-type of the link is “video/x-m4v” and the type attribute of the enclosure tag is also “video/x-m4v”. The actual error says "there are no playable episodes " .iTunes needs that the file extension in the url to be one of .mp3, .m4v, .mov or similar so I had to add code to add the right file extension next to the .php in the links and instruct the Apache web server to map al queries to index.php.xxx back to index.php. So the link in the enclosure tag look like
I tested it with the following podcast and it works like a charm
- diggnationvideo http://feeds.feedburner.com/diggnationvideo
- the java posse http://feeds.feedburner.com/javaposse
- ask a ninja http://feeds.feedburner.com/AskANinja
- security now! http://leo.am/podcasts/sn
The actual mod_rewrite commands that you need to add to httpd.conf are