Skip to content

Commit

Permalink
Configure fallback redirects for old links + reset the /apply/web link
Browse files Browse the repository at this point in the history
  • Loading branch information
leomet07 committed Nov 24, 2023
1 parent e68d183 commit de2ec51
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,26 @@ module.exports = {
async redirects() {
return [
{
source: '/apply/web',
destination: 'https://forms.gle/oiQTKk374tzZ3iPZA',
source: "/apply/web",
destination: "mailto:[email protected]",
permanent: true,
},
]
];
},
async rewrites() {
return {
fallback: [
{
// Redirect old site links with one subdeps to article link
source: "/:department/:slug",
destination: `/article/:slug`,
},
{
// Redirect old site links with two subdeps to article link
source: "/:department/:sub_section/:slug",
destination: `/article/:slug`,
},
],
};
},
};

0 comments on commit de2ec51

Please sign in to comment.