I have a statically generated nextjs site. My /out folder in nextjs (and the root folder in s3) looks like this:
| index.html
| index.txt
| neighbors.html
| neighbors.text
| 404.html
|- neighbors
| 1.html
| 1.text
| 2.html
| 2.text
I have the s3 bucket with “Static website hosting” enabled, and when I visit the Bucket website endpoint at exampleurl.com/
it shows the correct index page. But when I visit exampleurl.com/neighbors
It shows the following error:
404 Not Found
Code: NoSuchKey
Message: The specified key does not exist.
Key: neighbors
If I visit exampleurl.com/neighbors.html
I do see the correct page, but how do I get it so that it routes correctly without appending .html? Is there a configuration in either s3 or nextjs that I am missing?