Root Path Pattern

0

How can I create a pattern only for the default page i.e. https://example.com or https://example.com/

I created a path pattern /
But everytime it just falls through to the default bucket. What am I doing wrong? Thanks!

DSB
已提問 5 年前檢視次數 182 次
2 個答案
0

For just root, "/" should do it.

Did you wait for it to fully propagate before testing with a cleared cached? Any CF changes can take 20+ minutes to take effect.

已回答 5 年前
0

Yes I did wait for it to propagate. But I figured out the issue if anyone else runs into this!

Specify a Default Root Object is the culprit. If you specify a default root object for your cloudfront distribution, that supersedes any path pattern you have, and I'm pretty sure immediately executes through the default bin. So if you have a lambda @ edge function for the default bin it will still call that one.

What I did was remove the default root object, then in my Path Pattern '/' behavior, I redirected to '/index.html' (or whatever your default root object was) once I performed my needed functions in my lambda function. Hope this helps!

DSB
已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南