You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allows you to redirect to another page, and optionally provide an [HTTP response status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages) as a second parameter.
@@ -382,7 +380,7 @@ A page (and not a child component) must `return` the result of `Astro.redirect()
382
380
383
381
For statically-generated sites, this will produce a client redirect using a [`<meta http-equiv="refresh">` tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv) and does not support status codes.
384
382
385
-
When using SSR, status codes are supported. Astro will serve redirected requests with a status of `302` by default unless another code is specified.
383
+
When using an on-demand rendering mode, status codes are supported. Astro will serve redirected requests with a default HTTP response status of `302` unless another code is specified.
386
384
387
385
The following example redirects a user to a login page:
0 commit comments