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);