fix(critical): move rewrites to beforeFiles to fix 404 on /de/produkte — middleware was intercepting before rewrites
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m45s
Build & Deploy / 🏗️ Build (push) Successful in 6m20s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 1m8s
Build & Deploy / ⚡ Performance & Accessibility (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-02-25 02:09:33 +01:00
parent bdde7c242c
commit fb62113a32

View File

@@ -415,20 +415,24 @@ const nextConfig = {
], ],
}, },
async rewrites() { async rewrites() {
return [ return {
{ beforeFiles: [
source: '/de/produkte', {
destination: '/de/products', source: '/de/produkte',
}, destination: '/de/products',
{ },
source: '/de/produkte/:path*', {
destination: '/de/products/:path*', source: '/de/produkte/:path*',
}, destination: '/de/products/:path*',
{ },
source: '/de/kontakt', {
destination: '/de/contact', source: '/de/kontakt',
}, destination: '/de/contact',
]; },
],
afterFiles: [],
fallback: [],
};
}, },
}; };