Ugly urls and cross-references

Hi,

I want to deploy my site on S3 with Cloudfront. Cloudfront only has a Default Root Object (e.g. index.html) for the root of the site.

This means that the default pretty urls don’t work. Cloudfront will not serve http://mysite.com/posts/apost/ as it does not add the default root object (index.html) to this link.

I hoped to work around this issue by using ugly urls. http://mysite.com/posts/apost.html would be served just fine by Cloudfront.

However, none of the links work when I turn on uglyurls. For example {{< ref "post/apost.md" >}} still results in the generation of a link targeting http://mysite.com/posts/apost/.

If I click the link, I get a 404 page not found. Adding .html to the address in the browser serves the right page, so the pages are generated correctly.

What is the right way to overcome this issue?

Thanks!

Jiri

This is interesting since I’m currently running a site on S3, so I wonder if your issue is in the templating somewhere perhaps?

That is, since http://mysite.com/posts/apost/ and https://mysiste.com/posts/apost/index.html are the same thing…