S3Sync.net

General Category => Feature Requests => Topic started by: Hichhiker on July 24, 2009, 01:27:53 AM



Title: option to (ab)use directory nodes as redirectors to index.html and such
Post by: Hichhiker on July 24, 2009, 01:27:53 AM
Ok, I do not know ruby so I wanted to throw this idea out to see if anyone can tell me what is wrong with it.

As far as I can tell, directories are stored as files with a fixed string in them (and fixed md5) and all the actual attributes are stored as headers.What if we put a javascript (or even plain html refresh redirect) into that file so that it will act as a fake index.html redirector for use of s3 as web servers (I am aware you cannot do that on the bucket level)

The only issue is that it would be nice to create a key with a trailing / for each directory in addition to one without.

What am I missing here - why is this a bad idea?

(here is an example that seems to work - change these two lines:
Code:
$S3syncDirString = '<script>window.location=window.location.pathname.replace(/\\/$/,"")+"/index.html";</script>{E40327BF-517A-46e8-A6C3-AF51BC263F59}'
$S3syncDirTag = '2cf7874cf11dc33742d5014722e9aae4'


)