Skip to main content

Can I use a wildcard in a URL redirect within an engagement?

For example, one of our products has multiple base URLs depending on where the user sits, so a sample would be (all preceded by https, of course):

www.subcompany1.com/feature

www.company2.com/feature

subdomain.company.com/feature

 

Would it work to redirect to $px-auto-resolve.com/feature?
 

Hi Jay. A wildcard would not work for a redirect, but the $px-auto-resolve token definitely will work for this exact use case. If you place the $px-auto-resolve token in any position  (or multiple positions) within a the url, PX will use the corresponding value from the current document.location to populate the redirect url dynamically.

 

Your example: $px-auto-resolve.com/feature would swap the customer’s existing domain into the position of the token, and redirect the user to /feature at that domain.


Reply