Back to Withastro

You attempted to rewrite a 404 inside a static page, and this isn't allowed.

src/content/docs/en/reference/errors/invalid-rewrite404.mdx

latest543 B
Original Source

import DontEditWarning from '~/components/DontEditWarning.astro'

<DontEditWarning />

:::caution[Deprecated] This error is from an older version of Astro and is no longer in use. If you are unable to upgrade your project to a more recent version, then you can consult unmaintained snapshots of older documentation for assistance. :::

InvalidRewrite404: Rewriting a 404 is only allowed inside on-demand pages.

What went wrong?

The user tried to rewrite a 404 page inside a static page.