Wildcard / Catch-All Support for 301 Redirects
Use Case
When migrating legacy sites or restructuring large URL paths, defining individual 301 redirects for every single nested page or route is inefficient and hard to maintain. Supporting wildcards or path matching (e.g., matching everything under /old-path/*) would allow users to redirect entire directory structures with a single rule.
Proposed Solution
Add support for wildcard characters (such as * or :path*) in the source and target fields of the redirect configuration.
Examples:
Directory Pattern:
From:
/blog/*To:
/posts/$1Result:
/blog/my-first-postredirects to/posts/my-first-post
Subpath Catch-All:
From:
/docs/v1/*To:
/docs/latest/Result: Any request under
/docs/v1/routes directly to/docs/latest/
Expected Behavior
The wildcard captures the remaining segment(s) of the path and forwards them to the destination path.
Exact path matches should continue to take priority over wildcard rules to prevent unintended overrides.