Requests & Wish List

Wildcard / Catch-All Support for 301 Redirects

S
StepheninRequests & Wish List
3 months ago

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/$1

    • Result: /blog/my-first-post redirects 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.

  1. In Review
  2. Planned
  3. In Progress
  4. Completed
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...