From ada42e0f841b57f3d67befe9d77ba48ea1d3bdbb Mon Sep 17 00:00:00 2001 From: Luis Alvarez Date: Mon, 26 Oct 2020 11:51:59 -0500 Subject: [PATCH] fix /search in i18n --- next.config.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/next.config.js b/next.config.js index b2d23be94..2121e5fb3 100644 --- a/next.config.js +++ b/next.config.js @@ -11,6 +11,14 @@ module.exports = { }, rewrites() { return [ + { + source: '/:locale/search', + destination: '/search', + }, + { + source: '/:locale/search/:path*', + destination: '/search', + }, { source: '/search/designers/:name', destination: '/search', @@ -25,11 +33,6 @@ module.exports = { source: '/search/:category', destination: '/search', }, - { - // This rewrite will also handle `/search/designers` - source: '/:locale/search/:category', - destination: '/search', - }, { source: '/checkout', destination: '/api/bigcommerce/checkout',