Skip to content

Instantly share code, notes, and snippets.

@remorses
Created July 11, 2023 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remorses/ceb7a3cfc3fac671866b5c67d464a1a5 to your computer and use it in GitHub Desktop.
Save remorses/ceb7a3cfc3fac671866b5c67d464a1a5 to your computer and use it in GitHub Desktop.
nextjs pattern to redirect to /docs.js
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