Skip to content

i18n: disable redirect from / to /fr/ (or /en/ or any language). #9395

@millette

Description

@millette

Astro Info

$ pnpm astro info

> robin.millette.info@0.5.4 astro /home/millette/travail/robin/robin.millette.info
> astro "info"

Astro                    v4.0.3
Node                     v18.19.0
System                   Linux (x64)
Package Manager          pnpm
Output                   static
Adapter                  none
Integrations             @astrojs/tailwind
                         @astrojs/mdx
                         @astrojs/sitemap

If this issue only occurs in one browser, which browser is a problem?

Any browser (server-side issue).

Describe the Bug

I upgraded a multilingual site to v4 and wanted to give the i18n feature a try. My original site has a bilingual front page (/) because it's very simple. When I added the i18n feature after the upgrade, I noticed my front page was always redirected to /fr/ or /en/.

Can I keep the old behavior with my original bilingual front page at / with no language prefix and also enable the i18n feature?

What's the expected result?

I want to land on / page and not be redirector to either /fr/ nor /en/.

Link to Minimal Reproducible Example

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions