Minor change to media delivery to improve caching at proxies and at the browser. Reloaded pages will be faster.
The technical, media-cache.restofthe.net domain added with the cache expiry set to 1 year on all the files, through .htaccess file.
Code:
# 1 Year expiry
Header set Cache-Control "max-age=29030400, public"
Permanent redirection (301) has been put in place at the current locations so nothing will break on the site. Used rewrites to achieve this.
Code:
RewriteEngine on
rewriterule ^scp/(.*)$ http://media-cache.restofthe.net/video/$1 [r=301,nc]
rewriterule ^2007/05/(.*\.swf)$ http://media-cache.restofthe.net/video/$1 [r=301,nc]
rewriterule ^2010/0./(.*\.flv)$ http://media-cache.restofthe.net/video/$1 [r=301,nc]
rewriterule ^2010/0./(.*\.swf)$ http://media-cache.restofthe.net/game/$1 [r=301,nc]
rewriterule ^2010/0./(.*\.gif)$ http://media-cache.restofthe.net/picture/$1 [r=301,nc]
rewriterule ^2010/0./(.*\.jpg)$ http://media-cache.restofthe.net/picture/$1 [r=301,nc]
rewriterule ^2010/0./(.*\.png)$ http://media-cache.restofthe.net/picture/$1 [r=301,nc]