From fb62113a327a0bef414f34e9adeb7bc620f059e1 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Wed, 25 Feb 2026 02:09:33 +0100 Subject: [PATCH] =?UTF-8?q?fix(critical):=20move=20rewrites=20to=20beforeF?= =?UTF-8?q?iles=20to=20fix=20404=20on=20/de/produkte=20=E2=80=94=20middlew?= =?UTF-8?q?are=20was=20intercepting=20before=20rewrites?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.mjs | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 2953d2ba..d5cfbe25 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -415,20 +415,24 @@ const nextConfig = { ], }, async rewrites() { - return [ - { - source: '/de/produkte', - destination: '/de/products', - }, - { - source: '/de/produkte/:path*', - destination: '/de/products/:path*', - }, - { - source: '/de/kontakt', - destination: '/de/contact', - }, - ]; + return { + beforeFiles: [ + { + source: '/de/produkte', + destination: '/de/products', + }, + { + source: '/de/produkte/:path*', + destination: '/de/products/:path*', + }, + { + source: '/de/kontakt', + destination: '/de/contact', + }, + ], + afterFiles: [], + fallback: [], + }; }, };