Reference

redirect

Throws an internal redirect for loaders, middleware, route handlers, or server actions. The target must be same-origin or relative; use `redirectExternal()` for trusted `http` or `https` destinations. The default status is `303`.

Signature

function redirect(location: string, options: RedirectOptions): never