重写Amazon S3的静态URL重写、静态、Amazon、URL

2023-09-11 09:24:31 作者:嘸媚√祗溈祢侕妖

在亚马逊S3托管纯静态网站的利益,是重写用于通过重写引擎访问它的资源,更友好的方式,URL和端点的唯一途径,如任何Web服务器?并且将它最好的主办这是一个EC2?

In 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.

您可以指定一个DNS CNAME到S3桶DNS。他们最近开始支持默认文档。

You can assign a DNS CNAME to an S3 bucket for DNS. And they recently started supporting a default document.

所以,你可以完美承载 http://www.example.com/ 或的 http://www.example.com/some/path/to/some/file.html

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