Open luukbrauckmann opened 3 months ago
Is this in production or in development? There is a "creative way" of enabling localised 404 pages, that is run postbuild only on production builds. See https://github.com/voorhoede/head-start/blob/main/scripts/move-404-pages.ts
The 404s do work in production. The problem is only in development. I researched if there were other ways to redirect the 404s like you can do with Netlify for example, but Cloudflare doesn't provide that possibility at the moment.
I wouldn't label this as a bug, but rather a request for improvement of the local development experience.
@decrek do you think we can tweak the current way the 404 dist pages are created, and add a 404 or in the src root that reuses the localised 404 page, like we did temporarily in this workaround? https://github.com/voorhoede/head-start/blob/3b21847c6ffc17412e2414c16374451e641601e9/src/pages/%5Blocale%5D/%5B...path%5D/index.astro#L5
I do think that could lead to less confusion. Otherwise I would label this one as wontfix and close it.
The 404 page is not working. If you move the files to
/src/pages
instead of/src/pages/[locale]
it will work, but you lose the locale parameter so there may be a other way to solve this.