A Ruby script to generate simple Amazon S3 Redirection Rules.
Nokogiri
ruby s3-routes-generator.rb input.txt
The generated XML is printed to STDOUT.
/home / /products/iphone /iphone /products /
home index.html products/iphone iphone products index.htmlIt assumes that:
- Website Hosting is enabled.
- Index Document is set to
index.html.
None. I release this script to Public Domain.
Is it possible to detect user agent from the request and redirect based on the user agent on amazon s3 static hosting?