3 ms·
You can serve html pages there like any other file. It seems you could use a CNAME configuration to do top level hosting. But you'd have to get someone to lin
by timf 18y ago
You can serve html pages there like any other file.
It seems you could use a CNAME configuration to do top level hosting. But you'd have to get someone to link to "index.html" explicitly since CloudFront will not do this for you. So "http://example.com/index.html http://example.com/index.html" is definitely do-able but you need to worry about "http://example.com http://example.com" and "http://example.com/ http://example.com/"
Objects in S3/CloudFront can have a trailing "/" as part of the name, so maybe you could get around that issue somehow.
--
More ugly, but you could alternatively put everything on a subdomain and do a permanent redirect to CloudFront.
example.com is your webserver, redirects all traffic to the exactly right path at "x.example.com/[....]" where "x.example.com" has CNAME pointer to cloudfront (relative links from those files will resolve OK directly to cloudfront URLs)