Podcasting should not be expensive - Part 2

Popularity can be both a blessing and a curse. It's great to have thousands of subscribers—Until you get the bill for your bandwidth. I don't want Illudium to become about raising money to run illudium.com. To avoid that I'm using the Coral Content Distribution Network. Coral is a free caching service that offloads your file requests to a geographically distributed array of cache servers. The result is that your users don't have problems getting your files and you don't get problems when your ISP bill arrives. To use Coral I just added the following to my .htaccess file:

# BEGIN CoralizeDirectories

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{QUERY_STRING} !coral-no-serve$
RewriteRule ^media/(.*)$ http://%{HTTP_HOST}.nyud.net:8090/media/$1 [R,L]

# END CoralizeDirectories

Make sure this is outside of the # BEGIN WordPress/# END WordPress section.
This comes almost straight from the example at coralcdn.org. The main change is that I used %{HTTP_HOST} instead of illudium.com, so this redirect isn't specific to my site. The two conditions are necessary to ensure that requests from the cache servers themselves aren't redirected. My media files are in illudium.com/media. This rule redirects all requests for files in the media directory to the cache address. For example, http://illudium.com/media/untitled01.mp3 will redirect to http://illudium.com.nyud.net:8090/media/untitled01.mp3. Try it if you don't believe me. The file is a minute of silence, so you might want to kill the download after you see the redirect. You should be able to adapt this if your podcasts are in a directory as mine are by changing the rewrite rule to match your directory. I don't know how to set it up for a subdomain (e.g. mp3.example.com). Perhaps someone who uses subdomains can comment on this. I'm not going to write a how-to on something I haven't done. Test your downloads after you set Coral up by using something that will show you the redirects. Most download managers do this.

Comments are closed.

Bad Behavior has blocked 33 access attempts in the last 7 days.

Creative Commons License