From fed33bf2a5fcdc5ac1a6c887c884bc251859c561 Mon Sep 17 00:00:00 2001 From: Leyland Yang <105257885+yangleyland@users.noreply.github.com> Date: Thu, 18 Dec 2025 09:01:45 -0800 Subject: [PATCH] Update create/redirects.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> --- create/redirects.mdx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/create/redirects.mdx b/create/redirects.mdx index c084c5440..5507d8d17 100644 --- a/create/redirects.mdx +++ b/create/redirects.mdx @@ -32,6 +32,34 @@ To match a wildcard path, use `*` after a parameter. In this example, `/beta/:sl ] ``` +### Partial wildcard patterns + +Use partial wildcards to match URL segments that start with a specific prefix. Add `*` at the end of a prefix to capture the remaining portion of that segment. + +```json +"redirects": [ + { + "source": "/en/articles/9140627-*", + "destination": "/collections/overview" + } +] +``` + +This redirects any path like `/en/articles/9140627-how-to-create-collections` or `/en/articles/9140627-getting-started` to `/collections/overview`. + +To preserve the captured portion in the destination, use the same partial wildcard pattern: + +```json +"redirects": [ + { + "source": "/old/article-*", + "destination": "/new/article-*" + } +] +``` + +This redirects `/old/article-123` to `/new/article-123`, substituting the captured value (`123`) into the destination. + ## Broken links Catch broken links with our CLI. [Install the CLI](/installation) and run the command: