Rewriting Amazon S3 static urls [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this questionIn the interest of hosting purely static sites from Amazon S3, is the only route to rewrite the URLs and endpoints for accessing it's resources in a friendlier way via a rewrite engine such as any web server? And would it best to host this as an EC2?
It seems overkill but wasn't sure if there were alternatives.
I'm not sure why you need to rewrite.
You can assign a DNS CNAME to an S3 bucket for DNS. And they recently started supporting a default document.
So you can perfectly host http://www.example.com/ or http://www.example.com/some/path/to/some/file.html
http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html
S3 offers no features to 'rewrite' URLs as keys are immutable.
If you want to use URLs that are different from the S3 key you'll have to proxy the requests yourself.
精彩评论