Created
July 11, 2023 18:56
-
-
Save remorses/ceb7a3cfc3fac671866b5c67d464a1a5 to your computer and use it in GitHub Desktop.
nextjs pattern to redirect to /docs.js
This file contains hidden or 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
module.exports = { | |
async redirects() { | |
return [ | |
{ | |
source: '/', | |
destination: 'https://example.com/docs', | |
permanent: false, | |
}, | |
{ | |
source: '/:slug*', | |
destination: 'https://example.com/docs/:slug*', | |
permanent: false, | |
}, | |
] | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment