-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static HTML export adds a trailing slash to URLs #2862
Comments
That's because with simple HTML files (without a custom server router) the only way to avoid the |
@sergiodxa Thanks for the response! In my experience, though, that's that's not how a lot of static servers work these days. ETA:
These ones don't automatically map as far as I can tell:
|
Let me ask this: if I were to make a PR that allowed |
I want this to be the default behavior as this is gonna work without any configurations. And it doesn't hurt. But I'd like to have an option to remove that and save as |
Closing this in favor of a PR. |
Expected Behavior
I love the new static HTML export functionality in next 3.x, but it is behaving somewhat differently than I would expect. If you have a next.config.js that looks like this:
then I would expect
next export
to create anout
directory like this:and I would expect
Link
components that link to/page2
to result in URLs that link to/page2
.Current Behavior
Instead, the config above produces an
out
directory like this:and
Link
components that link to/page2
result in URLs that link to/page2/
.Context
I'm trying to make a next site that can be easily hosted on a static server, but this feature means that all of the URLs in the site have an unnecessary trailing slash. This is not only a bit unsightly, but it's also not the same behavior as
next start
.Your Environment
The text was updated successfully, but these errors were encountered: