Skip to main content
Module

x/knight/mod.ts>redirect

MVC web server framework for Deno 🦕 built on Oak
Latest
function redirect
import { redirect } from "https://deno.land/x/knight@2.3.0/mod.ts";

Redirect the client to the given permanent location URL with a status code of 301 (Moved Permanently). This and all future requests should be directed to the given URI. (Cached in the browser)

Parameters

response: Response

The response object to use

location: string

The location to send back