Static bucket redirect requests append index.html to homepage URL

0

Hi, I'm hosting a static website (www) on an S3 bucket and I created another S3 bucket (without www) which redirects all requests to the "www" bucket. Both have been assigned to specific CloudFront distributions and everything works perfectly. The only issue I noticed is that when I access the site using the non-www version, I get correctly redirected to the www version, but "index.html" gets appended to the URL (this only happens on the homepage). Is there any workaround that would allow me to remove the "index.html" from the URL? Thanks!

colis
質問済み 4年前2504ビュー
2回答
0
回答済み 4年前
0

Hi awshakan,

thanks for getting back to me and also for pointing me in the right direction.

It was indeed an issue with the Default Root Object setting on CloudFront. Basically, the default root object setting needs to be blank on the CloudFront distribution that gets used for redirecting the requests, whereas it only needs to be set (in my case "index.html") on the CloudFront distribution that points to the S3 bucket containing the actual content of the site.

colis
回答済み 4年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ