URLs usually change over time, as you use another CMS or optimiye on your file structure. A 301 is used when a page has permanently changed location. Informing about this change is indispensable if you want to keep a positioning.
Aleksandr Hovhannisyan came up with an easy solution for Eleventy and Netlify. To directly cover several possible previous routes it is created as an array. You can find the loop in _redirects.njk.
Frontmatter:
---
redirectFrom: ['/old-route/', '/optionally-another-old-route/']
---