I came across a weird issue yesterday, a friend of mine was password protecting a folder with a .htaccess and .htpasswd file. Picture the file structure
folder1 with a number of files in it and subfolders.
folder2 inside folder1 that’s passworded with a .htaccess .htpassword
The conf file for the site allowed options +indexes so that the contents of folder1 showed it’s files and folders. Here’s the weird part, folder2 wasn’t listed. If you renamed the .htaccess in folder2 then it would be shown and my friend just couldn’t figure it out.
While he was calming down after getting stressed, I took it upon myself to find a solution and after 25 mins or so googling I had a solution.
Create another .htaccess file in folder1 with
# show directories containing .htaccess file
Simples when you know how eh!