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
paths contain dots with trailingSlash:true are forced to be accessed without trailing slash #16617
Comments
Paths with an extension are expectedly redirected in this way to ensure you don't get double requests for static files that do not have a trailing slash. |
I understand the intention for static files. |
Just got bit by this for a simple statically generated site with a page like I am using v9.5.3. Would be polite to give folks a heads-up on the trailingSlash page though - there's no need to for people to be surprised by this. |
Feel free to send a PR to the docs! |
I think not only related to #18164, but a duplicate, which should be closed |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
In my project, I have URLs with id contains dots as dynamic routes and want to keep them accessible with a trailing slash.
like:
https://github.com/vercel/next.js/
https://example.com/foo/this.is.not.a.file.but.id/
However, the following first RegExp treats them as file path and we can't access with trailing slash.
To Reproduce
trailingSlash: true
in next.config/pages/foo/[id].tsx
/foo/a.b.c/
in browser/foo/a.b.c
Expected behavior
Server should respond the html as
/foo/a.b.c/
.Screenshots
System information
The text was updated successfully, but these errors were encountered: