RedirectsΒΆ
The redirects.json
file can be used to redirect a user from a certain URL to another URL.
Note
Redirects are not supported when building a static site.
The redirects.json
file is a dictionary where the key is a string of the URL that will get redirected away from.
The value is either:
a string of the URL to temporarily redirect to, i.e. it redirects with a 302 status code
a dictionary with a
url
andpermanent
keys; ifpermanent
is set tofalse
or is missing, the status code will be a 302; if it is set totrue
, the status code will be a 301
{
"/current-url": "/new-url",
"/another-url": { "url": "/new-url", "permanent": false },
}