All Products
Search
Document Center

CDN:Configure URL purge rules that contain regular expressions

Last Updated:Sep 20, 2024

You can submit URLs that contain regular expressions in a purge task. Alibaba Cloud CDN purges resources from all URLs that match the regular expressions. This improves the efficiency of URL purge.

On the Purge/Prefetch tab, if you set Operation Method to Regular Expression and enter one or more URLs that contain regular expressions in the URL field, you can purge all resources from URLs that match the specified regular expressions. When you configure URLs that contain regular expressions, take note of the following rules:

  • You can specify URLs that contain only the following regular expressions in the URL field: [0-9], [a-z], [^/]*, and .*.

  • Enter one URL per line. Example: http://www.example.com/[0-9][a-z].*.jpg.

  • By default, each Alibaba Cloud account can submit up to 20 purge rules that contain regular expressions per day. If the daily peak bandwidth of your Alibaba Cloud account exceeds 10 Gbit/s, submit a ticket to request a quota increase.

  • URL purge, directory purge, and purge based on regular expressions support cache sharing. If cache sharing is configured for a domain name, you can submit a purge task with the root domain name or any associated domain name to purge the cache.

Procedure

  1. Log on to the Alibaba Cloud CDN console.

  2. Click Purge and Prefetch.

  3. On the Purge/Prefetch tab, set Operation Method to Regular Expression. 正则

  4. Enter the URLs, and click Submit.