Redirect wildcards
A wildcard redirect gives site administrators the ability to specify rules for redirecting multiple pages at once.
Format#
A wildcard starts with a :
and is followed by an alias, such as /products/:productid
. Splats are a special type of wildcard defined by ending a source url with /*
. The asterisk indicates the splat will match whatever follows after.
Take /products/*
for example. This configuration enables a target wildcard :splat
which would match /products/electronics/radio
. Also, a target of /inventory/:splat
would result in /inventory/electronics/radio
.
Wildcard rules#
- A wildcard represents an entire path segment that could be any value
/products/:productid
would not match/products/electronics/radio
because the wildcard:productid
can only match a single path segment
- A wildcard must start at the beginning of a path segment
- This is valid:
/products/:productid
- This is invalid:
/products/prefix:productid
- This is valid:
- To pass the wildcard information along to the target, it must have a matching wildcard
- This is valid:
/products/:productid
->/inventory/:productid
- This is invalid:
/products/:productid
->/inventory/:product
because the wildcard names don't match
- This is valid:
Project map nodes#
If you configure a project map node to be dynamic, the path segment is considered a wildcard for redirects. This means it must follow the same rules listed above when using a project map node as a source or target.