跳到內容
This is an unmaintained snapshot of the Astro v4 docs. View the latest docs.

Astro.redirect is not available in static mode.

本頁內容尚未翻譯。

StaticRedirectNotAvailable: Redirects are only available when using output: 'server' or output: 'hybrid'. Update your Astro config if you need SSR features.

The Astro.redirect function is only available when Server-side rendering is enabled.

To redirect on a static website, the meta refresh attribute can be used. Certain hosts also provide config-based redirects (ex: Netlify redirects).

See Also:

貢獻

你有哪些想法?

社群