kf bio photo

kf

Prickly on the outside. Gooey on the inside.

Twitter Facebook Google+ LinkedIn Instagram Github

Ran into a frustrating problem while setting up this site with clean urls.

Symptom

When in any directory other than root, such as http://kfring.com/foo/ CloudFront refuses to display an index.html as default.

What’s going on?

CloudFront does not respect root document settings when pulling directly from an S3 Bucket.

Solution

Change the CloudFront origin point to the website version of your S3 bucket.

Good Bad
kfring.com.s3-website-us-east-1.amazonaws.com kfring.com.s3.amazonaws.com

Result:

Clean URL’s such as http://kfring.com/archives can now work as expected.