/posts/ 2008/off-site-assets-with-s3

Off-site assets with S3

Mar 8, 2008

Finally, i’ve got round to moving the /misc folder off onto Amazon S3. I’ve decided to do this due to my upcoming hosting move, not having to worry about several hundred megabytes of static data will ease the strain of moving. So, how have I done it?

First of all I created a bucket on S3 with the name, from there I setup a CNAME in BIND for pointing to to allow direct referencing to the files within the bucket.     IN      CNAME

Then for the relocation of the misc folder, setup a simple Apache mod_rewrite rule to transfer all requests for the misc folder to S3.

RewriteEngine on
RewriteRule ^/misc/(.*)$$1 [R,L]

So now it’s all up and working, and to give it a try yourself, here is a fetching wallpaper of Rachel Stevens.