I'm currently working with a Nextjs site built with Prismic, hosted with Netlify. My client would like to be able to add 301 redirects from within Prismic, and I wondered if anyone had experience setting something like this up?
I currently have my redirects set up in my netlify.toml file, and as far as I am aware this is the only way to set them up with Nextjs hosted on Netlify.
So perhaps some sort of pre-build script that updates the netlify.toml file could work? It would be great to hear from anyone who's done this before, or who has a better idea for how to implement.
To clarify, I am already aware of how to set up redirects via Netlify's _redirects and netlify.toml. As mentioned in the OP, this is how the redirects are set up at the moment.
What my client is now asking for, is to be able to set up these redirects in Prismic, so I'm looking for a way to be able to use Prismic to set up these 301 redirects.
Hey @david.al.fox I've done this in the past for clients. I'll put it on my list to create a tutorial on how to do it - I'll share it here whenever I have it ready