diff --git a/packages/astro/src/vite-plugin-astro-server/route.ts b/packages/astro/src/vite-plugin-astro-server/route.ts index a54ece17836f..89173a1ecf8d 100644 --- a/packages/astro/src/vite-plugin-astro-server/route.ts +++ b/packages/astro/src/vite-plugin-astro-server/route.ts @@ -187,6 +187,7 @@ export async function handleRoute({ .some((segment) => { return locales.includes(segment); }); + // Even when we have `config.base`, the pathname is still `/` because it gets stripped before if (!pathNameHasLocale && pathname !== '/') { return handle404Response(origin, incomingRequest, incomingResponse); }