-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: replace middleware with next.config.js redirects to get redirect…
…s working
- Loading branch information
1 parent
bcbb634
commit a6cad4b
Showing
2 changed files
with
20 additions
and
23 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2021 - 2023 Dusan Mijatovic (dv4all) | ||
// SPDX-FileCopyrightText: 2021 - 2023 dv4all | ||
// SPDX-FileCopyrightText: 2022 - 2024 Ewan Cahen (Netherlands eScience Center) <[email protected]> | ||
// SPDX-FileCopyrightText: 2022 - 2024 Netherlands eScience Center | ||
// SPDX-FileCopyrightText: 2022 - 2025 Ewan Cahen (Netherlands eScience Center) <[email protected]> | ||
// SPDX-FileCopyrightText: 2022 - 2025 Netherlands eScience Center | ||
// SPDX-FileCopyrightText: 2022 Jesús García Gonzalez (Netherlands eScience Center) <[email protected]> | ||
// SPDX-FileCopyrightText: 2023 - 2024 Dusan Mijatovic (Netherlands eScience Center) | ||
// | ||
|
@@ -47,4 +47,22 @@ module.exports = { | |
}) | ||
return config | ||
}, | ||
|
||
// default redirects | ||
async redirects() { | ||
return [ | ||
// community default page | ||
{ | ||
source: '/communities/:slug', | ||
destination: '/communities/:slug/software', | ||
permanent: true, | ||
}, | ||
// profile default page | ||
{ | ||
source: '/profile/:orcid', | ||
destination: '/profile/:orcid/software', | ||
permanent: true, | ||
}, | ||
] | ||
}, | ||
} |