A Traefik middleware plugin for Cloudflare-style bulk redirects. It allows defining multiple redirects in a single Traefik Middleware configuration. This plugin supports exact redirects, subpath redirects, query string preservation, and configurable redirect status codes.
| Key | Description |
|---|---|
sourceURL | absolute source URL to match |
targetURL | absolute redirect destination URL |
statusCode | redirect status code: 301, 302, 303, 307, 308 |
preserveQueryString | enabled appends the original query string to the target URL |
subpathMatching | enabled matches the source path and all child paths below it |
Example usage
apiVersion: traefik.io/v1alpha1kind: Middlewaremetadata:name: bulk-redirectsspec:plugin:bulkRedirects:redirects:- sourceURL: https://example.com/premium/coupontargetURL: https://example.com/en/premium/statusCode: 302preserveQueryString: enabledsubpathMatching: disabled- sourceURL: https://example.com/docstargetURL: https://example.com/en/resourcesstatusCode: 301preserveQueryString: enabledsubpathMatching: enabled
experimental:plugins:bulkRedirects:moduleName: github.com/doodlescheduling/traefik-bulk-redirectsversion: v0.0.1