From d5d0d77180ca10da730d9301ef1076ae87a8f518 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sun, 12 Apr 2026 12:53:41 +0200 Subject: [PATCH] fix: comprehensive asset rewrites to resolve 404s in klz showcase --- apps/web/next.config.mjs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index a03bfd4..f035a1e 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -40,6 +40,7 @@ const nextConfig = { async rewrites() { return { beforeFiles: [ + // Assets requested from root { source: '/assets/:path*', destination: '/showcase/klz-cables.com/assets/:path*', @@ -52,6 +53,19 @@ const nextConfig = { source: '/wp-includes/:path*', destination: '/showcase/klz-cables.com/assets/klz-cables.com/wp-includes/:path*', }, + // Assets requested relatively from case-studies/work/blog subpages + { + source: '/:folder(case-studies|work|blog)/assets/:path*', + destination: '/showcase/klz-cables.com/assets/:path*', + }, + { + source: '/:folder(case-studies|work|blog)/wp-content/:path*', + destination: '/showcase/klz-cables.com/assets/klz-cables.com/wp-content/:path*', + }, + { + source: '/:folder(case-studies|work|blog)/wp-includes/:path*', + destination: '/showcase/klz-cables.com/assets/klz-cables.com/wp-includes/:path*', + }, ], }; },