-
Notifications
You must be signed in to change notification settings - Fork 101
/
redirects.js
43 lines (39 loc) · 1.07 KB
/
redirects.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { formatPermalink } from './src/utilities/formatPermalink.js'
export const redirects = async () => {
const staticRedirects = [
{
source: '/docs',
destination: '/docs/getting-started/what-is-payload',
permanent: true,
},
{
source: '/docs/beta',
destination: '/docs/beta/getting-started/what-is-payload',
permanent: false,
},
{
source: '/docs/v2',
destination: '/docs/v2/getting-started/what-is-payload',
permanent: true,
},
{
source: '/roadmap',
destination: 'https://github.com/payloadcms/payload/discussions/categories/roadmap',
permanent: true,
},
]
const internetExplorerRedirect = {
source: '/:path((?!ie-incompatible.html$).*)', // all pages except the incompatibility page
has: [
{
type: 'header',
key: 'user-agent',
value: '(.*Trident.*)', // all ie browsers
},
],
permanent: false,
destination: '/ie-incompatible.html',
}
const redirects = [...staticRedirects, internetExplorerRedirect]
return redirects
}