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*', + }, ], }; },