website icon indicating copy to clipboard operation
website copied to clipboard

Site redirecting to /lang/en/ instead of /en/

Open Daniel15 opened this issue 4 years ago • 6 comments

Need to investigate why the https://yarnpkg.com/ redirect is playing up.

Daniel15 avatar Dec 11 '19 00:12 Daniel15

@Haroenv Any ideas here?

Daniel15 avatar Dec 11 '19 00:12 Daniel15

hmm, it doesn't redirect to lang/en for me, what are your accept-language headers? for me https://yarnpkg.com/ goes to https://yarnpkg.com/en

Haroenv avatar Dec 11 '19 09:12 Haroenv

https://yarn.pm/react redirects me to https://legacy.yarnpkg.com/en/lang/en/package/react which displays a 404. This is clearly specifying the language twice, removing "/lang/en" gets me to the right page at https://legacy.yarnpkg.com/en/package/react

arye-eidelman avatar Jan 26 '20 14:01 arye-eidelman

I can replicate this now, but I'm not sure how to debug this. My guess is something with the new website, but old redirects somehow?

Haroenv avatar Jan 27 '20 08:01 Haroenv

@arye-dov-eidelman - Thanks for the report. I think that's due to some bad redirects on the new site. It's redirecting:

  • https://yarn.pm/react
  • https://yarnpkg.com/en/package/react
  • https://legacy.yarnpkg.com/lang/en/package/react
  • https://legacy.yarnpkg.com/en/lang/en/package/react

The new site shouldn't be inserting /lang/ in the URL. I submitted https://github.com/yarnpkg/berry/pull/802 to fix that.

I also updated yarn.pm to go directly to the legacy site, bypassing the broken redirect on the 'new' site (https://github.com/yarnpkg/release-infra/commit/667c9a44142bdf7a4611ec8b8885e0276b0284c8) which should fix it.

Daniel15 avatar Jan 27 '20 18:01 Daniel15

Actually I just realised that the package listing DOES exist on the new site, just without the /en/ in the URL. I'll update the redirect to go to the non-/en/ version instead.

Daniel15 avatar Jan 27 '20 18:01 Daniel15