From e0e7c0af3d3a86f84f9745a6468e0a4fb835d4d4 Mon Sep 17 00:00:00 2001 From: Caleb Denio Date: Mon, 8 Jul 2024 13:10:43 -0400 Subject: [PATCH] Move `/donate` -> `/philanthropy` redirect to `next.config.mjs` --- middleware.js | 4 ---- next.config.mjs | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/middleware.js b/middleware.js index f96baab2..3edfc883 100644 --- a/middleware.js +++ b/middleware.js @@ -13,9 +13,5 @@ export function middleware(request) { return response } - if (request.nextUrl.pathname === '/donate/') { - return NextResponse.redirect('https://hackclub.com/philanthropy/') - } - return NextResponse.next() } diff --git a/next.config.mjs b/next.config.mjs index b2961bdd..032d7ce8 100755 --- a/next.config.mjs +++ b/next.config.mjs @@ -196,7 +196,12 @@ const nextConfig = { source: '/slack', destination: '/arcade?param=slack', permanent: false - } + }, + { + source: '/donate', + destination: '/philanthropy', + permanent: false + }, ] }, async rewrites() {