From c0043b0d6788abb7b1b2f9b7eb0c79153c7bc224 Mon Sep 17 00:00:00 2001 From: Asser Ayman Date: Tue, 21 Oct 2025 09:17:49 +0300 Subject: [PATCH] redirect to base url --- next.config.ts | 12 ++++++++++++ src/i18n/config.ts | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/next.config.ts b/next.config.ts index 5e2795e2..094bc6ab 100644 --- a/next.config.ts +++ b/next.config.ts @@ -44,6 +44,18 @@ const config: NextConfig = { }, redirects: async () => { return [ + { + // Redirects from /en to / (for old Google-indexed URLs) + source: "/en", + destination: "/", + permanent: true, + }, + { + // Redirects from /en/:path* to /:path* (for old Google-indexed URLs) + source: "/en/:path*", + destination: "/:path*", + permanent: true, + }, { // Redirects from /regions/:region to /region/:region source: "/regions/:region", diff --git a/src/i18n/config.ts b/src/i18n/config.ts index aa0f81ff..bb0a4a96 100644 --- a/src/i18n/config.ts +++ b/src/i18n/config.ts @@ -21,7 +21,6 @@ export const routing = defineRouting({ localePrefix: { mode: "as-needed" as const, prefixes: { - "en-US": "/en", "ar-SA": "/ar", "bn-BD": "/bn", "fr-FR": "/fr",