Mass redirect using Nginx map file
Sometimes after upgrading or migrating an application you still need to keep old links working. A simple way to handle this in Nginx is to use a map file and redirect the requests to their new locations. If you are using HAProxy, you can find a similar example here: Haproxy . This approach is useful when you have many URLs to redirect and don’t want to clutter the main configuration with dozens (or hundreds) of rewrite rules.