It would be helpful to be able to supply an array of “from” arguments in a particular [[redirects]]
directive instead of having to repeat the entry multiple times. For entries that need to redirect from lots of possible matches with granular control (instead of broad “splat”-ing), arrays of “from” arguments would be SUPER helpful.
For context, here are the redirects as written in the custom hexo site I’ve been tasked with porting over to netlify. It uses a custom gulp process to write out the config for redirects (IE: NOT ON NETLIFY)
"type":"redirect",
"matchPath":"^/(jobs|jobs/|jobs.html)$",
"location":"https://careers.somesite.net",
"status":301,
"qsa":true,
"caseSensitive":false,
"cacheControl":"7200"
You can see from the “matchPath” it uses regex to parse multiple matches addresses. The only way to achieve this at the moment is to do something like this :
[[redirects]]
from = "/jobs"
to = "https://careers.somesite.net"
status = 301
force = true
[[redirects]]
from = "/jobs.html"
to = "https://careers.somesite.net"
status = 301
force = true
Again this is only two entries, but once it starts scaling this can become a maintenance nightmare, and explode the TOML file up to ridiculous sizes quickly.
Here’s what I think it should look like.
[[redirects]]
from = ["/jobs", "/jobs.html"]
to = "https://careers.somesite.net"
status = 301
force = true
Thanks