diff --git a/apps/www/app/discord/page.tsx b/apps/www/app/discord/page.tsx deleted file mode 100644 index c5b855aad4..0000000000 --- a/apps/www/app/discord/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from "next/navigation"; - -export default function DiscordRedirect() { - return redirect("https://discord.gg/fDbezjbJbD"); -} diff --git a/apps/www/app/github/page.tsx b/apps/www/app/github/page.tsx deleted file mode 100644 index b100c6a753..0000000000 --- a/apps/www/app/github/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from "next/navigation"; - -export default function DiscordRedirect() { - return redirect("https://github.com/unkeyed/unkey"); -} diff --git a/apps/www/next.config.js b/apps/www/next.config.js index db480cdd91..512771248d 100644 --- a/apps/www/next.config.js +++ b/apps/www/next.config.js @@ -23,45 +23,53 @@ const nextConfig = { }, ]; }, - async redirects() { + async rewrites() { return [ { source: "/changelog/:slug", destination: "/changelog#:slug", // Matched parameters can be used in the destination + }, + ]; + }, + async redirects() { + return [ + { + source: "/docs", + destination: "https://unkey.mintlify.dev/docs", + permanent: true, + }, + { + source: "/docs/:match*", + destination: "https://unkey.mintlify.dev/docs/:match*", + permanent: true, + }, + { + source: "/engineering", + destination: "https://unkey-engineering.mintlify.dev/engineering", + permanent: true, + }, + { + source: "/engineering/:match*", + destination: "https://unkey-engineering.mintlify.dev/engineering/:match*", + permanent: true, + }, + { + source: "/discord", + destination: "https://discord.gg/fDbezjbJbD", + permanent: true, + }, + { + source: "/github", + destination: "https://github.com/unkeyed/unkey", + permanent: true, + }, + { + source: "/meet", + destination: "https://cal.com/team/unkey", permanent: true, }, ]; }, - rewrites: () => [ - { - source: "/docs", - destination: "https://unkey.mintlify.dev/docs", - }, - { - source: "/docs/:match*", - destination: "https://unkey.mintlify.dev/docs/:match*", - }, - { - source: "/engineering", - destination: "https://unkey-engineering.mintlify.dev/engineering", - }, - { - source: "/engineering/:match*", - destination: "https://unkey-engineering.mintlify.dev/engineering/:match*", - }, - { - source: "/discord", - destination: "https://discord.gg/fDbezjbJbD", - }, - { - source: "/github", - destination: "https://github.com/unkeyed/unkey", - }, - { - source: "/meet", - destination: "https://cal.com/team/unkey", - }, - ], }; module.exports = withContentCollections(withBundleAnalyzer(nextConfig));