yarnpkg / website

Yarn package manager website
https://classic.yarnpkg.com
431 stars 976 forks source link

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

Open Daniel15 opened 4 years ago

Daniel15 commented 4 years ago

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

Daniel15 commented 4 years ago

@Haroenv Any ideas here?

Haroenv commented 4 years ago

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

arye-eidelman commented 4 years ago

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

Haroenv commented 4 years ago

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?

Daniel15 commented 4 years ago

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

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 commented 4 years ago

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.