From 543b7c6cbfd67ac285f52c041daec6c2ad3abd04 Mon Sep 17 00:00:00 2001 From: Bekah Hawrot Weigel Date: Thu, 30 May 2024 11:21:11 -0400 Subject: [PATCH] Add news as a subdirectory --- next.config.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index 0fb9a9703..10261c984 100644 --- a/next.config.js +++ b/next.config.js @@ -15,6 +15,15 @@ const nextConfig = { }, ], }, + { + source: "/news/:path*", + headers: [ + { + key: "x-forwarded-host", + value: "opensauced.pizza" + } + ], + }, ] }, async rewrites() { @@ -30,7 +39,15 @@ const nextConfig = { { source: '/docs/', destination: 'https://docs.opensauced.pizza/', - } + }, + { + source: "/news/:path*/", + destination: "https://news.opensauced.pizza/blog/:path*/", + }, + { + source: "/news/", + destination: "https://news.opensauced.pizza", + }, ]; }, skipTrailingSlashRedirect: true,