Simple serverless function to redirect some URLs to other URLs.
Edit src/redirects.ts
and add to the array. The Redirect
interface is commented.
interface Redirect {
from: string, // the original hostname, without protocol or path
to: string, // a full URL to redirect to
maintain_path?: boolean, // whether to maintain the request path (if the `to` URL also has a path, then the request path is appended to it)
};