Open MarkWestside opened 1 year ago
When exporting you may need whatever server you end up using to do a redirection like demoed in next.config.js
. For instance if hosting on Vercel, you have a similar configuration specific to Vercel.
Locally I think you can tweak serve to do that, see https://github.com/vercel/serve-handler#options
I’m talking about standard web servers where you don’t have control over redirects or routing. Imagine a learning management system where you upload the static HTML export as a course.
I don't think they can host a normal SPA either then, you need a way to point any URL to index.html
I think you might need instaed an exported Next.js app that outputs one file per page, it works fine as long as you don't have dynamic routes (since you also need a rewrite to handle those)
As redirects are not possible for static HTML export, / (or index.html) will just return a blank page.