Use several URLs in the same rules condition

The “Visitor’s URL (regexp)” condition allows you to create "OR" conditions for your rules.

You may sometimes want to perform an action on several pages that do not have a URL string in common, and need to create an “OR” condition.  The “Visitor’s URL (regexp)” condition comes in handy in these situations, as it allows you to do different tricks with URLs by using javascript regular expressions.

Simply list your URL strings and separate them with a vertical bar. The vertical bar equals “or”in this case. 

In the below example, we want our rule to trigger for visitors on the, and pages. 

Our rule condition is When Visitor’s url (regexp) matches: pricing|products|our-services 

Screenshot 2021-05-25 at 15.12.30

When using Regexp conditions, it often is a good idea to escape possible special characters (e.g. ? , =, / ), as some of them may have a special meaning in regexps. You can escape characters by adding a backslash (\) in front of special characters.