-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
(docs) URLs with trailing slashes #672
base: main
Are you sure you want to change the base?
Conversation
It looks like Netlify automatically redirects to URLs with trailing slashes (go to `wmr.dev/docs`, then reload). I'm not sure if there's a way to turn that off on the Netlify side? If not, we can just generate them with trailing slashes to match.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought: Maybe the trailing url thing is something we should deal with in our router instead? Most other ones seem to do it and that's a much more generic solution rather than tying the url structure to a specific hosting provider.
What do you mean by dealing with it in the router? Something like a config for "add trailing slash"? (would have to be a regex to prevent it being appended to |
Nah, rather that the regex is more loose and matches both with and without trailing slashes for the same route.
(Might be misunderstanding the issue at hand when it comes to netlify) |
It seems you can only force URL normalisation, not turn it off. See https://docs.netlify.com/routing/redirects/redirect-options/#trailing-slash |
It looks like Netlify automatically redirects to URLs with trailing slashes (go to
wmr.dev/docs
, then reload). I'm not sure if there's a way to turn that off on the Netlify side? If not, we can just generate them with trailing slashes to match.