From d793c2395becb1f010d91e9b48f95484e01e09a4 Mon Sep 17 00:00:00 2001 From: Stefan Probst Date: Thu, 4 Apr 2024 11:42:46 +0200 Subject: [PATCH] fix: update legacy redirects --- next.config.js | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/next.config.js b/next.config.js index 4931c2103..734914ac4 100644 --- a/next.config.js +++ b/next.config.js @@ -26,30 +26,40 @@ const config = { /** @type {Awaited>>} */ const redirects = [ { - source: "/resource/posts/:path*", - destination: "/resources/:path*", + source: "/:locale(de|en)?/resource/posts/lesson-1-make-a-plan", + destination: "/resources/semantickraus-lesson-1-make-a-plan", permanent: true, }, { - source: "/curriculum/:path*", - destination: "/curricula/:path*", + source: "/:locale(de|en)?/resource/posts/lesson-2-meet-the-data", + destination: "/resources/semantickraus-lesson-2-meet-the-data", permanent: true, }, { - source: "/resource/posts/lesson-1-make-a-plan", - destination: "/resources/semantickraus-lesson-1-make-a-plan", + source: "/:locale(de|en)?/resource/posts/lesson-3-copy-and-paste", + destination: "/resources/semantickraus-lesson-3-copy-and-paste", permanent: true, }, { - source: "/resource/posts/lesson-2-meet-the-data", - destination: "/resources/semantickraus-lesson-2-meet-the-data", + source: "/:locale(de|en)?/resource/posts/:path*", + destination: "/resources/:path*", permanent: true, }, { - source: "/resource/posts/lesson-3-copy-and-paste", - destination: "/resources/semantickraus-lesson-3-copy-and-paste", + source: "/:locale(de|en)?/curriculum/:path*", + destination: "/curricula/:path*", permanent: true, }, + { + source: "/:locale(de|en)?/resources/page/:path*", + destination: "/resources", + permanent: false, + }, + { + source: "/:locale(de|en)?/curricula/page/:path*", + destination: "/curricula", + permanent: false, + }, ]; return Promise.resolve(redirects);