fix: redirect root my pages to overview page

This commit is contained in:
Michael Zetterberg
2024-05-16 14:04:50 +02:00
parent ed93a6c841
commit f1682b5a15
2 changed files with 29 additions and 10 deletions

View File

@@ -72,6 +72,35 @@ const nextConfig = {
return config
},
redirects() {
return [
{
source: myPages.da,
destination: overview.da,
permanent: false,
},
{
source: myPages.de,
destination: overview.de,
permanent: false,
},
{
source: myPages.fi,
destination: overview.fi,
permanent: false,
},
{
source: myPages.no,
destination: overview.no,
permanent: false,
},
{
source: myPages.sv,
destination: overview.sv,
permanent: false,
},
]
},
rewrites() {
return {
beforeFiles: [
@@ -102,12 +131,6 @@ const nextConfig = {
{ source: login.no, destination: "/no/login" },
{ source: login.sv, destination: "/sv/login" },
{ source: myPages.da, destination: "/da/my-pages/overview" },
{ source: myPages.de, destination: "/de/my-pages/overview" },
{ source: myPages.fi, destination: "/fi/my-pages/overview" },
{ source: myPages.no, destination: "/no/my-pages/overview" },
{ source: myPages.sv, destination: "/sv/my-pages/overview" },
{ source: overview.da, destination: "/da/my-pages/overview" },
{ source: overview.de, destination: "/de/my-pages/overview" },
{ source: overview.fi, destination: "/fi/my-pages/overview" },