-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
45 lines (41 loc) · 993 Bytes
/
next.config.js
File metadata and controls
45 lines (41 loc) · 993 Bytes
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
44
45
const URL_OLD_SITE = "https://old.plett.dev";
const redirectPaths = [
"/split-second",
"/More",
"/More/photography",
"/More/media-features",
"/More/game-of-life",
"/More/other-stuff",
];
/** @type {import('next').NextConfig} */
const nextConfig = {
async redirects() {
return [
...redirectPaths.map((source) => ({
source,
destination: `${URL_OLD_SITE}${source}`,
permanent: true,
})),
{ source: "/games", destination: "https://plett.fun", permanent: true },
{ source: "/home", destination: "/", permanent: true },
];
},
async rewrites() {
return [
{ source: "/feed.xml(.*)", destination: "/feed.xml" },
{
source: "/images/:path*",
destination: "/images/:path*",
},
{
source: "/icons/:path*",
destination: "/icons/:path*",
},
{
source: "/cv/:path*",
destination: "/cv/:path*",
},
];
},
};
export default nextConfig;