From 5d5b30886c3b3dd8a8911e1881fb5135a995a702 Mon Sep 17 00:00:00 2001 From: samad Date: Fri, 13 Feb 2026 02:27:52 +0530 Subject: [PATCH] fix: add redirect from /apis to /api for backward compatibility --- app-next/next.config.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app-next/next.config.ts b/app-next/next.config.ts index 5263f8ef..80a75fc0 100644 --- a/app-next/next.config.ts +++ b/app-next/next.config.ts @@ -12,6 +12,13 @@ const nextConfig: NextConfig = { // SIMPLE PATH-BASED REDIRECTS (✅ Works in next.config.ts) // ======================================== + // Legacy /apis route redirect to /api + { + source: "/apis", + destination: "/api", + permanent: true, // 301 redirect (preserves SEO and bookmarks) + }, + // Entity detail pages: /d/123 → /datasets/123 (no locale prefix for English) { source: "/d/:id", @@ -94,4 +101,4 @@ const nextConfig: NextConfig = { }, }; -export default withNextIntl(nextConfig); +export default withNextIntl(nextConfig); \ No newline at end of file