You got infected by the malware that created htaccess to all your subfolders?
Here is a quick php script to remove all of them.
1. Create a php file
2. Copy the script below
3. Upload the file to your root folder
4. Open it in your browser.
​
<?php
$dir = new RecursiveDirectoryIterator(getcwd());
$files = new RecursiveIteratorIterator($dir);
foreach($files as $file){
$name_of_file = $file->getFileName();
$path_of_file = $file->getPath().”/”.$file->getFileName();
//need to concatenate “/” otherwise it shows all attached (path and file name)
if ($name_of_file == “.htaccess”) {
//echo $path_of_file . “<br />”;
unlink($path_of_file);
}
}
echo “ALL HTACCESS FILE DELETED!”
?>
