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
[Bug]: Link to "/" with basename adds extra trailing slash causing SEO issues #8709
Comments
yeah, I'm experiencing the same issue. |
I'm using a V5 version, I had the same problem, But I checked it, because there was a folder name with the same name as the route in my public folder. This problem no longer occurs after I change the folder name. hope this helps. |
This issue has been automatically marked stale because we haven't received a response from the original author in a while 🙈. This automation helps keep the issue tracker clean from issues that are not actionable. Please reach out if you have more information for us or you think this issue shouldn't be closed! 🙂 If you don't do so within 7 days, this issue will be automatically closed. |
I believe this was fixed in 6.4.0 via #8861. If you leave a trailing slash off the https://stackblitz.com/edit/github-aw7opq-vugywt?file=src%2FApp.tsx |
What version of React Router are you using?
6
Steps to Reproduce
https://stackblitz.com/edit/github-aw7opq-k9k4xc?file=src%2Fmain.tsx
Use a basename in the router (for example /foo), there is no way to link to the basename without a trailing slash.
Expected Behavior
There is an option to link to the basename without a trailing slash.
Actual Behavior
Our project has a canonical URL ending without a trailing slash, this causes unnecessary redirects. There is currently no way to redirect to a basename without a trailing slash
This issue is related to #6226, but with an additional use case.
The text was updated successfully, but these errors were encountered: