nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.74k stars 481 forks source link

301 redirection on each page #2492

Closed GuillaumeDgr closed 8 months ago

GuillaumeDgr commented 1 year ago

Environment

Reproduction

https://devloop.dev/any-url

Describe the bug

Each time I visit any or my nuxt3 website url, a 301 redirection occurs and redirects to url/ with trailing slash at the end. This is really a problem for SEO matters...

I look for all topics about it but did not find any workable solution, pls help me!

Many thanks! Screenshot 2023-10-12 at 17 39 12 Screenshot 2023-10-12 at 17 42 01

Additional context

No response

Logs

No response

github-actions[bot] commented 1 year ago

Would you be able to provide a reproduction? 🙏

More info ### Why do I need to provide a reproduction? Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. ### What will happen? If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect. If `needs reproduction` labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it. ### How can I create a reproduction? We have a couple of templates for starting with a minimal reproduction: 👉 [Reproduction starter (v8 and higher)](https://stackblitz.com/fork/github/BobbieGoede/nuxt-i18n-starter/tree/v8) 👉 [Reproduction starter (edge)](https://stackblitz.com/fork/github/BobbieGoede/nuxt-i18n-starter/tree/edge) A public GitHub repository is also perfect. 👌 Please ensure that the reproduction is as **minimal** as possible. See more details [in our guide](https://nuxt.com/docs/community/reporting-bugs/#create-a-minimal-reproduction). You might also find these other articles interesting and/or helpful: - [The Importance of Reproductions](https://antfu.me/posts/why-reproductions-are-required) - [How to Generate a Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/mcve)
GuillaumeDgr commented 1 year ago

Hi, I have given you an url / prod example - I cannot reproduce it, this strangely is working in localhost but not in prod after using 'yarn generate'. I can give you my i18n config :

i18n: { baseUrl: "https://devloop.dev", locales: [ { name: "English", code: "en", iso: "en-US", file: "en-US.json", dir: "ltr", }, { name: "Español", code: "es", iso: "es-ES", file: "es-ES.json", dir: "ltr", }, { name: "Français", code: "fr", iso: "fr-FR", file: "fr-FR.json", dir: "ltr", }, { name: "Català", code: "ca", iso: "ca-AD", file: "ca-AD.json", dir: "ltr", }, // Default locale should be at the array's end ], lazy: true, langDir: "locales", defaultLocale: "ca", strategy: "prefix_except_default", compilation: { strictMessage: false }, // To avoid HTML in Json error detectBrowserLanguage: false, },

github-actions[bot] commented 9 months ago

Would you be able to provide a reproduction? 🙏

More info ### Why do I need to provide a reproduction? Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. ### What will happen? If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect. If `needs reproduction` labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it. ### How can I create a reproduction? We have a couple of templates for starting with a minimal reproduction: 👉 [Reproduction starter (v8 and higher)](https://stackblitz.com/fork/github/BobbieGoede/nuxt-i18n-starter/tree/v8) 👉 [Reproduction starter (edge)](https://stackblitz.com/fork/github/BobbieGoede/nuxt-i18n-starter/tree/edge) A public GitHub repository is also perfect. 👌 Please ensure that the reproduction is as **minimal** as possible. See more details [in our guide](https://nuxt.com/docs/community/reporting-bugs/#create-a-minimal-reproduction). You might also find these other articles interesting and/or helpful: - [The Importance of Reproductions](https://antfu.me/posts/why-reproductions-are-required) - [How to Generate a Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/mcve)
BobbieGoede commented 8 months ago

Closing due to inactivity and lack of reproduction (a URL is not sufficient), if you're still experiencing this issue please open a new issue with a (minimal) reproduction.