-
Notifications
You must be signed in to change notification settings - Fork 1
/
redirects.js
39 lines (36 loc) · 899 Bytes
/
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
const redirects = async () => {
const internetExplorerRedirect = {
destination: '/ie-incompatible.html',
has: [
{
type: 'header',
key: 'user-agent',
value: '(.*Trident.*)', // all ie browsers
},
],
permanent: false,
source: '/:path((?!ie-incompatible.html$).*)', // all pages except the incompatibility page
}
const additionalRedirects = [
{
source: '/wp/:path*',
destination: '/',
permanent: true,
},
{
// Redirect for 'rdfk' with an extension
source: '/rdfk:extension(\\.[^.]+)',
destination: '/rdfk',
permanent: false,
},
{
source: '/home',
destination: '/',
permanent: true,
},
]
// Combine all redirects into a single array
const redirects = [internetExplorerRedirect, ...additionalRedirects]
return redirects
}
export default redirects