Limitations
Static or prerendered pages
Static or prerendered pages (that are defined with export const prerender = true
or default for hybrid) will need a rewrite rule.
For example, if you have a static /about
page, create a rewrite of:
If you don’t use trailing slashes, you will need to also add:
For static dynamic routes, like a route of /blog/[slug].astro
, create a rewrite of:
Base path rewrites
404 Pages
Custom 404 pages (like 404.astro
) need to be server-side rendered (not prerendered) to work. This is a limitation with Amplify.
Static files without extensions
Due to limitations with Amplify routing, to serve public
files without extensions, place them in a folder called assets
(/public/assets/
) and reference them with /assets/filename
:
Any other static files with extensions will work as usual.