diff --git a/packages/astro/src/core/routing/manifest/create.ts b/packages/astro/src/core/routing/manifest/create.ts index d1f498432e72..aabdd4e63d76 100644 --- a/packages/astro/src/core/routing/manifest/create.ts +++ b/packages/astro/src/core/routing/manifest/create.ts @@ -183,7 +183,7 @@ function createFileBasedRoutes( validateSegment(segment, file); const parts = getParts(segment, file); - const isIndex = isDir ? false : basename.startsWith('index.'); + const isIndex = isDir ? false : basename.substring(0, basename.lastIndexOf('.')) === "index"; const routeSuffix = basename.slice(basename.indexOf('.'), -ext.length); const isPage = validPageExtensions.has(ext);