Path Order
  • 11 Feb 2024
  • 1 Minute to read
  • PDF

Path Order

  • PDF

Article summary

The CDN evaluates the request URI against each path in the list in the order in which they appear. Only rules in the first path that matches the requested URI are applied. It is important to arrange the path list in a logical way to achieve the desired outcome.

In case of overlapping paths, where multiple paths match specific content items, the subpath should be positioned first in the list. For example, if you want to apply certain rules to all the .m3u8 files except for those in the xyz path, organize the paths as follows:

Path 1: /xyz/*.m3u8
Path 2: *.m3u8

This arrangement ensures that requests for .m3u8 files within the /xyz/ path adhere to the rules specified by path /xyz/*.m3u8, rather than those specified by path *.m3u8. Requests for other .m3u8 files follow the rules of the *.m3u8 path.


In the following example, the path order is illogical:

TypicalPathOrderError1a.png

The processing parameters defined for the second path will never be applied, because the path /*.jpg encompasses the files in the path /path2/*.jpg.

Note that this type of mistake will not generate a validation error.



If the goal is to apply distinct rules to files in /path2/*.jpg, the order should be adjusted so that in the path list, the more specific path precedes the broader path:

FixedError1a.png




Here's another example of a logical path order, where the paths are arranged based on hierarchy, with the most specific paths appearing before the less specific ones.

5PathRulesB.png


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.