Tag-Archive for » disable directory listing «

Sunday, October 12th, 2008 | Author: Angelo

Disable directory listings using .htaccess.

If you want to disable directory listing for any folder then simply create one file as .htaccess in that directory & insert rule IndexIgnore * in that file.

IndexIgnore * means directory will not list any file or folder. If you want to disable listing of .jpg files only then rule would be IndexIgnore *.jpg with this rule directory will list all files and folders excluding files with extension .jpg.

Monday, October 06th, 2008 | Author: Angelo

Hello,

cPanel tomcat shows directory listing when someone access their site on tomcat port 8080. It is not possible to disable directory listing via .htaccess although tomcat is running on apache port 80. You can disable it on tomcat server by making following changes to web.xml file.

Edit web.xml located in tomcat conf directory and search for line <param-name>listings</param-name> below this line you will find one more line as <param-value>true</param-value> change the value true to false and restart tomcat service and you have disabled directory listing for your tomcat server.