public static function deleteHtAccessFiles()
    {
        $files = Filesystem::globr(PIWIK_INCLUDE_PATH, ".htaccess");

        // that match the list of directories we create htaccess files
        // (ie. not the root /.htaccess)
        $directoriesWithAutoHtaccess = array(
            '/js',
            '/libs',
            '/vendor',
            '/plugins',
            '/misc/user',
            '/config',
            '/core',
            '/lang',
            '/tmp',
        );

        foreach ($files as $file) {
            foreach ($directoriesWithAutoHtaccess as $dirToDelete) {
                // only delete the first .htaccess and not the ones in sub-directories
                $pathToDelete = $dirToDelete . '/.htaccess';
                if (strpos($file, $pathToDelete) !== false) {
                    @unlink($file);
                }
            }
        }
    }
public static function deleteHtAccessFiles()
    {
        $files = Filesystem::globr(PIWIK_INCLUDE_PATH, ".htaccess");

        // that match the list of directories we create htaccess files
        // (ie. not the root /.htaccess)
        $directoriesWithAutoHtaccess = array(
            '/js',
            '/libs',
            '/vendor',
            '/plugins',
            '/misc/user',
            '/config',
            '/core',
            '/lang',
            '/tmp',
        );

        foreach ($files as $file) {
            foreach ($directoriesWithAutoHtaccess as $dirToDelete) {
                // only delete the first .htaccess and not the ones in sub-directories
                $pathToDelete = $dirToDelete . '/.htaccess';
                if (strpos($file, $pathToDelete) !== false) {
                    @unlink($file);
                }
            }
        }
    }
public static function deleteHtAccessFiles ( ) { $ files = Filesystem :: globr ( PIWIK_INCLUDE_PATH , ".htaccess" ) ; // that match the list of directories we create htaccess files // (ie. not the root /.htaccess) $ directoriesWithAutoHtaccess = array ( '/js' , '/libs' , '/vendor' , '/plugins' , '/misc/user' , '/config' , '/core' , '/lang' , '/tmp' , ) ; foreach ( $ files as $ file ) { foreach ( $ directoriesWithAutoHtaccess as $ dirToDelete ) { // only delete the first .htaccess and not the ones in sub-directories $ pathToDelete = $ dirToDelete . '/.htaccess' ; if ( strpos ( $ file , $ pathToDelete ) !== false ) { @ unlink ( $ file ) ; } } } }
Deletes all existing .htaccess files and web.config files that Matomo may have created,
Deletes all existing . htaccess files and web . config files that Matomo may have created