-
Notifications
You must be signed in to change notification settings - Fork 88
Fix trailing slashes with an edge function #1448
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
Comments
From @ascorbic
|
Highly needed due to SEO requirements. Please don't forget |
We won't @mike-essen. It'll roll out with our work on edge routing. 👍 |
Is there any ETA on the work on edge routing? 👍 |
Not yet @PFJoey. We'll keep you updated as we know more. |
What is the status on this one? |
@hk86 we are currently working on a new edge router that will allow us to handle more complex routing cases and will include better trailing slash handling. in the meantime you can use the following edge function to add or strip trailing slashes on static pages https://github.com/ascorbic/slash-edge |
Any idea about when this is going to be resolved? |
I have fixed some issues with ascorbic's functions that handles querystrings and _redirects |
The team at Netlify have now released the new You can find the documentation and additional information here: Next.js on Netlify The Thanks! |
Uh oh!
There was an error while loading. Please reload this page.
By default Next.js will redirect urls with trailing slashes to their counterpart without a trailing slash. For example
/about/
will redirect to/about
. This has caused issues (see below).@ascorbic created a proof of concept to add or remove trailing slashes in an edge function. This can be used to enable or disabled trailing slashes based upon the Next.js configuration.
Documentation
https://github.com/ascorbic/slash-edge
https://nextjs.org/docs/api-reference/next.config.js/trailing-slash
Related Issues
#1329
#998
#1144
#1788
The text was updated successfully, but these errors were encountered: