Trailing slash route mismatch
See original GitHub issueHey guys, I think this is still an issue.
When using trailingSlash: true
and basePath: /dev
you get warnings on the console like so:
Warning: Prop 'href' did not match. Server: "/dev/second" Client: "/dev/second/"
.
Tried both ways:
<Link href="/second">
<a>Second Page</a>
</Link>
and
<Link href="/second/">
<a>Second Page</a>
</Link>
next version 9.4.5-canary.42
_Originally posted by @marlonmarcello in https://github.com/vercel/next.js/issues/15194#issuecomment-662167808_
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:12 (9 by maintainers)
Top Results From Across the Web
How to fix internal redirects from trailing slash mismatch?
This issue means that the one URL on your site is redirected to another internal URL. The presence/absence of a trailing slash is...
Read more >Keep trailing slash in route with default parameter in Symfony ...
Symfony 5.1. I'm updating some legacy code and I need the following routes to match: /article ...
Read more >How to force https, www and a trailing slash with one redirect
The right way is to make the .htaccess check for the / then check for www. and https:// . If any of our...
Read more >Ktor should resolve trailing slash as a different URL - YouTrack
(tailcard) does not match URLs ending with '/' ... These requests don't have any trailing slash, but still, Ktor will route them to...
Read more >How to force trailing slash? - Solved - Kirby forum
Any ideas? Redirect URL with trailing slash to canonical URL without trailing slash. Route Handlers Don't Match with Trailing Slashes.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Incidentally, I thought I thought I had to use
exportTrailingSlash: true
. I can’t reproduce usingtrailingSlash: true
in the next.config.jsSounds like this can be closed then because exportTrailingSlash is something different and should no longer be used when the
trailingSlash
option is on stable.