Archive

Posts Tagged ‘index’

Simple way to disable direcotry index in webserver

March 14th, 2009

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
Bookmark and Share  
 

Yejun Linux, Web , ,