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.
|
marvinhagemeister
left a comment
There was a problem hiding this comment.
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.