code: public CmsSite getSiteForRootPath(String rootPath) {
  
          if ((rootPath.length() > 0) && !rootPath.endsWith("/")) {
              rootPath = rootPath + "/";
          }
          // most sites will be below the "/sites/" folder,
          CmsSite result = lookupSitesFolder(rootPath);
          if (result != null) {
              return result;
          }
          // look through all folders that are not below "/sites/"
          String siteRoot = lookupAdditionalSite(rootPath);
          return (siteRoot != null) ? getSiteForSiteRoot(siteRoot) : null;
      }
docs: Returns the site for the given resources root path,
  or <code>null</code> if the resources root path does not match any site.<p>
  
  @param rootPath the root path of a resource
  
  @return the site for the given resources root path,
  or <code>null</code> if the resources root path does not match any site
  
  @see #getSiteForSiteRoot(String)
  @see #getSiteRoot(String)