Creating Permanent and Temporary Redirects with Nginx

from blog Robb Knight • Posts • RSS Feed, | ↗ original
As part of a change to move my blog posts from /slug-of-post to /blog/slug-of-post I needed to set permanent redirects in my Nginx config so the old post links wouldn't 404. Forge has a UI for this but it only allows doing one redirect at a time and I had ~130 to do. So I grabbed a list of all my post slugs and formatted them with multi-line edit...