Wildcard or Regular Expression for a query string parameter

Is it possible to use wildcards and/or regular expression to auto-redirect from one path to the other when part of the original path is unknown?

For example:

I want to redirect from this: http://www.sitename.com/folder1/aa1234567/ To this: http://www.sitename.com/folder1/aa1234567/reference

The seven digit number in the “from” path will always be different (unknown) and can be thousands of different combinations, so I want to append the keyword “reference” at the end of the path for every and all instances regardless of what the seven digit number will be.

I have tried using several different wildcards and regular expressions with no success.

Wildcards and Regex for URL


Solution 1:

Set the Include pattern and Redirect to options as shown on the image below. Then for Pattern type, select Regular Expression.

Redirect setting