Home
		 > 
Linux,  
Web		 > Simple way to disable direcotry index in webserver	
 
	
		Simple way to disable direcotry index in webserver
		
		
			This script will disable webserver’s directory index for currect directory and all subdirectories.
IFS=$'\n'
for i in $( find . -type d); do
    if [[ ! -f "$i/index.html" && ! -f "$i/index.php" ]]; then
        touch "$i/index.html"
    fi
done 
			
				Yejun				Linux,  Web				bash, index, webserver