It is currently Sun May 20, 2012 1:58 pm

All times are UTC + 10 hours [ DST ]


Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Media caching improved
PostPosted: Fri Mar 19, 2010 5:31 pm 
Offline
Site Admin
User avatar

Joined: Mon Jan 11, 2010 3:38 am
Posts: 60
Location: Melbourne, Australia
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]

_________________
Rest of the Net | Funny videos, pictures and games


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 10 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron