Trailing `/` in i18n Redirects to `/learn`
See original GitHub issueNoticed in: https://github.com/freeCodeCamp/freeCodeCamp/pull/44809
To Reproduce
- Go to: https://www.freecodecamp.org/portuguese/learn/
- See
301
redirect to/learn
OR
- Go to https://www.freecodecamp.org/learn/
- Choose another language
- Refresh the page
- See
301
to/learn
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Advanced Features: Internationalized Routing - Next.js
Next.js has built-in support for internationalized (i18n) routing since v10.0.0 . You can provide a list of locales, the default locale, and domain-specific ......
Read more >angular i18n: avoid trailing slash in url on prerendered root page
I prerender an i18n angular application and i've taught apache to work withouth trailing slashes when a directory is requested.
Read more >Problem with trailing slash and global redirect - Drupal Answers
When the two modules enabled, the redirection in the home page not working. Does someone has solution for this? i18n-l10n.
Read more >Global Redirect | Drupal.org
Checks the current URL for a trailing slash, removes it if present and ... been known issues with i18n causing redirect-loops and such....
Read more >.htaccess redirect root to i18n content - Server Fault
"to https://example.com/en " - I assume the target URL should have a trailing slash? Is /en a physical directory? – MrWhite. Feb 3,...
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
This is blocked by upcoming containerization
Some additional information and thoughts.
Here is a bug report from a camper: https://twitter.com/WIPjVrUKr0cNazQ/status/1584593154451595265?s=20&t=I5py5Jbf-6JnaILWZZEkWg
They bookmarked the Japanese top page of /learn (that has the URL
https://www.freecodecamp.org/japanese/learn/
by default) but every time they open it it redirects to the English page.I’ve also seen many Japanese tweets that say the URL of the Japanese page they shared doesn’t work.
Details of the reported issue
Steps to reproduce:
Actual result: User is redirected to the English page Expected result: User can open the Japanese page
As a workaround for the situation above, they can edit the bookmarked URL and remove the trailing
/
.So I thought, if we could prevent the trailing
/
appearing in the URL in the address bar of the browser, we could reduce the chances that users encounter this issue. If it’s easier than fixing the redirect.However, after some discussion with Shaun in the dev team chat, the traling
/
seems to be added by the browser. So it may not be an easy fix either.The conversation we had
The link about trailing slash in the conversation above: https://developers.google.com/search/blog/2010/04/to-slash-or-not-to-slash
I think this issue is heavily affecting the experience of international users. I’ll continue looking for if there is something we can do to improve the situation, but I’m not familiar with all the frameworks behind the issue so I appreciate your feedback and help.