Web: /markets, /facilities, /ai, /api-docs redirects to canonical routes
1 changed file +11 −0
modified
apps/web/next.config.ts
+11 −0
@@ -30,6 +30,17 @@ const nextConfig: NextConfig = { | ||
| 30 | 30 | config.resolve.extensionAlias = { ...(config.resolve.extensionAlias ?? {}), ".js": [".ts", ".tsx", ".js"], ".mjs": [".mts", ".mjs"] }; |
| 31 | 31 | return config; |
| 32 | 32 | }, |
| 33 | + async redirects() { | |
| 34 | + // short public aliases (spec §85 / §101) → canonical routes | |
| 35 | + return [ | |
| 36 | + { source: "/markets", destination: "/datacenters/markets", permanent: true }, | |
| 37 | + { source: "/markets/:slug", destination: "/datacenters/markets/:slug", permanent: true }, | |
| 38 | + { source: "/facilities", destination: "/datacenters", permanent: true }, | |
| 39 | + { source: "/facilities/:slug", destination: "/datacenters/:slug", permanent: true }, | |
| 40 | + { source: "/ai", destination: "/ai-infrastructure", permanent: true }, | |
| 41 | + { source: "/api-docs", destination: "/developers", permanent: true }, | |
| 42 | + ]; | |
| 43 | + }, | |
| 33 | 44 | async headers() { |
| 34 | 45 | return [ |
| 35 | 46 | { |
| 36 | 47 | |