Manager Redirects in Next.js
Load manager controlled redirects from zesty.io in next.js
Zesty provides a function, fetchZestyRedirection, as seen here https://github.com/zesty-io/nextjs-starter/blob/main/lib/zesty/fetchRedirects.js, load this function inside of next.config.js and place it as the return results next async redirects() function.
If you wish to combine redirects from multiple sources, fetch the await fetchZestyRedirects()
into a separate variable and join the array https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat
Example of joining zesty redirects to your customer redirects.
Last updated