We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5.11
No response
Hi have these settings:
base: "/astro", site: isDev || isPreview ? "http://localhost:4321" // development : "https://www.myapp.com", // production build
In Dev mode, when I type http://localhost:4321/astro, I get redirected to:http://localhost:4321/astro/en-GB, so ok
In Preview mode, when I type http://localhost:4321/astro, I get redirected to:http://www.myapp.com/astro/en-GB
Becase of the logic I have:
In Preview mode, when I type http://localhost:4321/astro, I should get redirected to:http://localhost:4321/astro/en-GB Or is preview mode using the settings, as if it was in Build?
P.S. I've had to resort to using preview / build mode locally, as astro doesn't yet support accessing astro locally behind a reverse proxy, e.g. http://localhost:7080/astro -> http://localhost:4321/astro
This had been raised as a previous GitHub issue, but was closed, without feature followup.
seeabove
The text was updated successfully, but these errors were encountered:
Hello @dreamstar-enterprises. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.
needs repro
Sorry, something went wrong.
This is all you will need to reproduce the issue:
export default defineConfig({ output: "static", base: "/astro", site: isDev || isPreview ? "http://localhost:4321" // development : "https://www.myapp.com", // production build prefetch: { defaultStrategy: "tap", prefetchAll: false, }, i18n: { defaultLocale: i18nConfig.defaultLocale, locales: i18nConfig.locales.map((locale) => locale.code), fallback: { // @ts-ignore "en-us": "en-gb", }, routing: { prefixDefaultLocale: true, redirectToDefaultLocale: true, fallbackType: "rewrite", }, } }
// Shared i18n configuration export const i18nConfig = { defaultLocale: "en-gb", locales: [ { code: "en-gb", name: "English (United Kingdom)", }, { code: "en-us", name: "English (United States)", }, ], }; // Convert locales array to Record for sitemap (see below) const sitemapLocales = Object.fromEntries( i18nConfig.locales.map((locale) => [locale.code, locale.code]), );
Can you create a minimal reproduction on stackblitz or as a repo? We can't take the time to manually reproduce unfortunately
No branches or pull requests
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Hi have these settings:
In Dev mode, when I type http://localhost:4321/astro, I get redirected to:http://localhost:4321/astro/en-GB, so ok
In Preview mode, when I type http://localhost:4321/astro, I get redirected to:http://www.myapp.com/astro/en-GB
What's the expected result?
Becase of the logic I have:
In Preview mode, when I type http://localhost:4321/astro, I should get redirected to:http://localhost:4321/astro/en-GB
Or is preview mode using the settings, as if it was in Build?
P.S. I've had to resort to using preview / build mode locally, as astro doesn't yet support accessing astro locally behind a reverse proxy, e.g. http://localhost:7080/astro -> http://localhost:4321/astro
This had been raised as a previous GitHub issue, but was closed, without feature followup.
Link to Minimal Reproducible Example
seeabove
Participation
The text was updated successfully, but these errors were encountered: