I have a folder structure like this...
- folder
- folder01
- public
- open
- closed
- folder02
- public
- open
- closed
- folder03
- public
- open
- closed
- folder04...
These main folders are sequentially numbered and dynamically created with three sub folders. I need to password protect each of the 'closed' folders with the same long password. However I do not want to have to manually add in the .htaccess into the 'closed' folder each time a new main folder is added as this could get tedious and what happens if I forget!
Basically I am looking for a solution where these 'closed' folders will be protected by .htaccess but the 'public' and 'open' folders would not.