I'm working on migrating a site to another platform. We have a Python script to handle the import and we're considering using Varnish for speed. I want to make sure all existing URLs remain functional (in the form of 301 redirects) and I'm considering doing this directly in Varnish. We're talking about 3k+ URLs and we won't be able to catch this into a couple of regular expressions.
Ideally I would keep the list of redirects in a separate file, json, csv or xml but from a bit of research it seems there's no straightforward way to do this except for generating a huge
.vcl file with
elseifs with the import script. Is there a nicer way to do mass 301 redirects in Varnish?