This check looks for the presence of the .htaccess file inside the web directory.
It is here only as a convenience check for users that install the basic version of Bolt.

{@inheritdoc}
174522
public function check()
    {
        $request = Request::createFromGlobals();
        $serverSoftware = $request->server->get('SERVER_SOFTWARE', '');
        $isApache = strpos($serverSoftware, 'Apache') !== false;
        if (!$isApache) {
            return;
        }

        $path = $this->pathResolver->resolve('%web%/.htaccess');
        if (is_readable($path)) {
            return;
        }

        throw new ApacheValidationException();
    }
142505
public function accept()
	{
		if( $this->isDot() )
			return FALSE;

		$isDir	= $this->isDir();
		if( !$this->showFiles && !$isDir )
			return FALSE;

		if( $this->stripDotEntries )
		{
			if( preg_match( "@^\.\w@", $this->getFilename() ) )
				return FALSE;
			$pathName	= str_replace( "\\", "/", "/".$this->getPath() );
			if( preg_match( "@/\.\w@", $pathName ) )
				return FALSE;
		}

		return preg_match( $this->pattern, $this->getFilename() );
	}
1089948
protected function checkBrowserOmniWeb()
    {
        if (stripos($this->_agent, 'omniweb') !== false) {
            $aresult = explode('/', stristr($this->_agent, 'omniweb'));
            $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : '');
            $this->setVersion($aversion[0]);
            $this->setBrowser(self::BROWSER_OMNIWEB);
            return true;
        }
        return false;
    }
953159
private function _openSHXFile($toWrite = false)
    {
        $this->SHXFile = $this->_openFile($toWrite, '.shx', 'Index');
        if (! $this->SHXFile) {
            return false;
        }

        return true;
    }
448114
public static function denyWebAccess($directory)
    {
        if (!file_exists($directory.'/.htaccess')) {
            if (!is_dir($directory)) {
                $filesystem = new Filesystem();
                $filesystem->mkdir($directory);
            }

            @file_put_contents($directory.'/.htaccess', 'Deny from all');
        }
    }
287453
private function checkForTrailingSlashRedirect()
    {
        if (!empty($this->segments) && empty($this->segments[count($this->segments) - 1])) {
            //Trim off the empty segment
            array_pop($this->segments);

            $newUrl = $this->baseHREF . '/' . implode('/', $this->segments);

            header("Location: " . $newUrl);
            exit();
        }
    }
1338957
private function detectHomeDirectory()
    {
        // Environment variable COMPOSER points to the composer.json we should use.
        if (false !== ($home = getenv('COMPOSER'))) {
            return dirname($home);
        }

        if ('' !== \Phar::running()) {
            // Strip scheme "phar://" prefix and "tenside.phar" suffix.
            $home = dirname(substr(\Phar::running(), 7));
        } else {
            $home = getcwd();
        }

        if ((PHP_SAPI !== 'cli') && (substr($home, -4) !== DIRECTORY_SEPARATOR . 'web')) {
            throw new \RuntimeException(
                'Tenside is intended to be run from within the web directory but it appears you are running it from ' .
                basename($home)
            );
        }

        return dirname($home);
    }
694312
protected static function checkSecureFolder()
  {
    if (!is_dir(static::getStorePath())) {
      mkdir(static::getStorePath());
    }
    if (!file_exists(static::getStorePath() . '.htaccess')) {
      $afc = static::getAssetContent('htaccess');
      $f = new File(static::getStorePath() . '.htaccess', true);
      $f->write($afc);
    }
    if (!file_exists(static::getStorePath() . 'read.php')) {
      $afc = static::getAssetContent('read');
      $afc = str_replace('%autoloader%', self::$autoloaderPath, $afc);
      $afc = str_replace('%storepath%', self::$storePath, $afc);
      $f = new File(static::getStorePath() . 'read.php', true);
      $f->write($afc);
    }
  }
6262
public boolean hasModuleResourcesWithUndefinedSite() {

        if (getSite() == null) {
            for (String modRes : getResources()) {
                if (!CmsStringUtil.isPrefixPath("/system/", modRes)
                    && !OpenCms.getSiteManager().startsWithShared(modRes)) {
                    return true;
                }

            }
        }
        return false;
    }
251630
static function exists( $fileName = "site.ini", $rootDir = "settings" )
    {
        if ( $fileName == "" )
            $fileName = "site.ini";
        if ( $rootDir == "" )
            $rootDir = "settings";
        if ( $rootDir[0] !== "/" )
            $rootDir = __DIR__ . "/../../../" . $rootDir;
        if ( file_exists( $rootDir . '/' . $fileName ) )
            return true;
        else if ( file_exists( $rootDir . '/' . $fileName . '.append.php' ) )
            return true;
        else if ( file_exists( $rootDir . '/' . $fileName . '.append' ) )
            return true;
        return false;
    }
515477
private function check_base_url()
    {
        $url_valid = filter_var($this->baseurl, FILTER_VALIDATE_URL);
        if (!$url_valid) {
            trigger_error('The URL provided is incomplete or invalid!');

            return false;
        }

        $base_url_components = parse_url($this->baseurl);
        if (empty($base_url_components['port'])) {
            trigger_error('The URL provided does not have a port suffix, normally this is :8443');

            return false;
        }

        return true;
    }
245392
public function canHtaccessFileBeUpdated()
    {
        try {
            $defaultPathParameters = $this->getDefaultPathParams();
            $defaultPathParameters['sBaseUrlPath'] = $this->extractRewriteBase($defaultPathParameters['sShopURL']);
            $this->updateHtaccessFile($defaultPathParameters);
        } catch (Exception $exception) {
            return false;
        }

        return true;
    }
787488
public function equals(UrlPathInterface $urlPath): bool
    {
        return $this->isAbsolute() === $urlPath->isAbsolute() && $this->getDirectoryParts() === $urlPath->getDirectoryParts() && $this->getFilename() === $urlPath->getFilename();
    }
515753
public function checkDirectory(): bool
    {
        if (empty($this->directory)) {
            throw new InvalidConfigException(
                "Log directory is not defined in given configuration, ".
                "define it using 'query_log_directory' key to activate logging.");
        }

        // provide some performance escaping to call "is_dir" and "mkdir" functions
        self::$directoryChecked = self::$directoryChecked ?: is_dir($this->directory);
        if (!self::$directoryChecked) {
            self::$directoryChecked = mkdir($this->directory, 0644, true);

            // !!! notice !!!
            // set your log dir secure
            file_put_contents($this->directory .'/index.php',
                "<?php header('HTTP/1.1 403 Forbidden'); ?>");
            // this action is for only apache, see nginx configuration here:
            // http://nginx.org/en/docs/http/ngx_http_access_module.html
            file_put_contents($this->directory .'/.htaccess',
                "Order deny,allow\r\nDeny from all");
        }

        return self::$directoryChecked;
    }
775601
public function hasLink()
    {
        return isset($this->attrs['url'])
            && trim($this->attrs['url'])
            && $this->attrs['url'] !== '#'
            && $this->attrs['url'] !== 'http://';
    }
279635
public function isStaticFile($sitePath, $siteName, $uri)
    {
        $this->checkMageMode($sitePath);

        $uri = $this->handleForVersions($uri);
        $route = parse_url(substr($uri, 1))['path'];

        $pub = '';
        if ('developer' === $this->mageMode) {
            $pub = 'pub/';
        }

        if (!$this->isPubDirectory($sitePath, $route, $pub)) {
            return false;
        }

        $magentoPackagePubDir = $sitePath;
        if ('developer' !== $this->mageMode) {
            $magentoPackagePubDir .= '/pub';
        }

        $file = $magentoPackagePubDir . '/' . $route;

        if (file_exists($file)) {
            return $magentoPackagePubDir . $uri;
        }

        if (strpos($route, $pub . 'static/') === 0) {
            $route = preg_replace('#' . $pub . 'static/#', '', $route, 1);
            $_GET['resource'] = $route;
            include $magentoPackagePubDir . '/' . $pub . 'static.php';
            exit;
        }

        if (strpos($route, $pub . 'media/') === 0) {
            include $magentoPackagePubDir . '/' . $pub . 'get.php';
            exit;
        }

        return false;
    }
725623
public function isRewrite()
    {
        return !empty($this->settings[ 'RewriteEngine' ]) &&
            $this->settings[ 'RewriteEngine' ] == 'on' &&
            in_array('On', $this->currentRequest->getHeader('HTTP_MOD_REWRITE'));
    }