【发布时间】:2021-10-30 05:22:37
【问题描述】:
我有一个托管在 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,但看起来它只为根/域设置它,而不是子文件夹。
谢谢。
【问题讨论】:
标签: reactjs amazon-web-services next.js