Skip navigation
User Manual
Overview

Wildcards

Wildcards are used for matching entire groups of similar URLs. For example, suppose you only want to show the Drip widget on the "/blog" subdirectory of your site. To achieve this, you need to use a wildcard. 

Wildcards are denoted as either a single or double asterisk:

  • * single asterisk
  • ** double asterisk

Single Asterisk Wildcards

The single asterisk matches an individual URL segment. For example, the following subcategory "/blog/*" utilizes a single asterisk wildcard. The wildcard captures the subcategory one level deeper than the one denoted. Therefore if the subcategory "/blog/" contains each blog post, the wildcard would capture "/blog/post_1", "/blog/post_2", "/blog/post_3", and so on. 

Double Asterisk Wildcards

The double asterisk (**) wildcard matches one or more URL segments. For example, "/blog/**" matches "/blog/123 and /blog/category/marketing/1234" and so on.

Here are a few examples of how to mix wildcards together:

You can also use the single asterisk(*) wildcard in the query string. For example, /blog/**?s=* will match any page under the blog subdirectory with the query string parameter set to anything.

Phrases wrapped in square brackets will be interpreted as regular expressions. For example, we will translate [(help|support)] into/(help|support)/ and match against it the current URL in JavaScript. For more information about regular expressions, check out this guide.