code: public static String getMatchingRootFolder(String targetedUrl) {
          String[] targetedRootFolders = SiteProperties.getRootFolders();
          if (ArrayUtils.isNotEmpty(targetedRootFolders)) {
              for (String targetedRootFolder : targetedRootFolders) {
                  if (targetedUrl.startsWith(targetedRootFolder)) {
                      return targetedRootFolder;
                  }
              }
          }
  
          return null;
      }
docs: Return the root folder of the specified targeted URL
  
  @param targetedUrl the targeted URL
  
  @return the root folder that matches the targeted URL