我有一个托管在 AWS 上的 NextJS 应用程序。我的文件夹结构是这样的:
- index.html
- /articles
-- index.html
-- /article1
---- /index.html
-- /article2
---- /index.html
.
.
.
如何将路由设置为 /articles 指向 /articles/index.html,/article1 指向 /article1/index.html 等等。我的应用程序中的每个文件夹都有一个对应的 /index.html。我在 S3 上托管了我的一方,我正在使用 cloudfront。我已经尝试将默认根对象设置为 /index.html 但它看起来只为根/域设置它,而不是子文件夹。
谢谢。
