code: public static String getOriginalPath(@NotNull String path, @NotNull ResourceResolver resourceResolver) {
      if (StringUtils.isEmpty(path)) {
        return null;
      }
      Matcher versionHistoryMatcher = VERSION_HISTORY_PATTERN.matcher(path);
      if (versionHistoryMatcher.matches()) {
        return "/content" + versionHistoryMatcher.group(1);
      }
      Matcher legacyVersionHistoryMatcher = LEGACY_VERSION_HISTORY_PATTERN.matcher(path);
      if (legacyVersionHistoryMatcher.matches()) {
        if (isTenant(resourceResolver)) {
          legacyVersionHistoryMatcher = LEGACY_VERSION_HISTORY_TENANT_PATTERN.matcher(path);
        }
        if (legacyVersionHistoryMatcher.matches()) {
          return "/content" + legacyVersionHistoryMatcher.group(1);
        }
      }
      Matcher launchesMatcher = LAUNCHES_PATTERN.matcher(path);
      if (launchesMatcher.matches()) {
        return launchesMatcher.group(1);
      }
      return path;
    }
docs: Resolve original path if the path is a version history or launch path.
  If the path does not point to any of these locations it is returned unchanged.
  @param path Path
  @param resourceResolver Resource resolver
  @return Path that is not a version history or launch path