Regex Path
Regex paths redirect multiple URLs to a single URL. For example, a billing system may use the customer's contract ID in the URL, as in the following examples:
- www.example.com/Billing/374-3D3-AK4/
- www.example.com/Billing/F92-K52-V88/
- www.example.com/Billing/98D-NMK-3S2/
You can then create a regex path to normalize the URLs above so that all users go to www.example.com/Billing/.
Creating a regex path
On the navigation bar, go to settings > Property Settings > Regex Path and click + Add Regex Path.
Regex | Replacement |
---|---|
^Billing/[A-Z0-9]{3}-[A-Z0-9]{3}-[A-Z0-9]{3}/$ | Billing/ |
^(.+)/[A-Z0-9]{3}-[A-Z0-9]{3}-[A-Z0-9]{3}/$ | $1/ |
Regex paths must be configured in the DXA portal, after which the rule will apply to all subsequently recorded pageviews.