.htaccess Prevent directory browsing December 21, 2011 Pramod T P Leave a comment If index file is not there in a directory, visitors can view all the files in that directory. You can prevent this by adding a single line code (Given Below)in your .htaccess file . Options All -Indexes