I have a NextJS application hosted on AWS. My folder structure is like this:
- index.html
- /articles
-- index.html
-- /article1
---- /index.html
-- /article2
---- /index.html
.
.
.
How do I set the routing to that /articles points to /articles/index.html, /article1 points to /article1/index.html and so on. Every folder in my app has a corresponding /index.html. I have hosted my side on S3 and I am using cloudfront. I have already tried setting the default root object to /index.html but it looks like it only sets it for the root/domain, not the subfolders.
Thanks.
CodePudding user response: