Related Podcast Link: Listen to Episode 119!
Want to hide the content of that folder you just uploaded? Here are three ways of doing just that.
When you view a folder on the web that does not have any sort of index file in it, such as your standard web page or anything else of that nature, most server setups show an index of the files and folders inside of that folder. It shows everything that is in there and gives it a slightly pretty way of doing so.
Create a Blank Index File
What if you don’t want this folder content to be seen though? One quick way around it would be to create a blank index.html file, upload it to the folder in question, and your done.
Do it Via a .htaccess Edit
Another way of getting the same thing done is to navigate to the folder where you want to hide the default index, then create or edit your .htaccess file. You want to add this line to the top of it.
options -indexes
That will turn off the default index for that folder.
Hide That Folder via Your Control Panel
Most control panels also have this feature built in too, just in case you are looking for an easier solution. Via cPanel’s File Manager v3 (in cPanel 11) you can right click on a folder, select “Manage Indices” and get to the options for that folder that way. A few check mark boxes later you should be good to go.















