I’ve added to my website a protection with all the users granted access to it. There are some parts of the site that are specific to a certain user’s utilization, but it doesn’t ask me the password after the first login.
If you already logged in before, you don’t need to log in again because the authentication cookie is still saved in your browser.
If you want to test if the authentication is still working, delete your browser’s cookies or open the website using an anonymous tab.
I’m not sure I understood the problem. But if you want to give access to a user in the main folder and disallow access to the same user in a sub-folder, you will need two different rules.
.htaccess rules are inherited by the sub-folders of the folder where the .htaccess resides.
If you want to disallow in a sub-folder, the user you allowed in the main folder, you need an .htaccess in the sub-folder with a rule to disallow access to that user.
I’m not sure if what you’re trying to do is possible with Directory Privacy. I believe that with Directory Privacy you either have access to a particular directory or your don’t. And if you have access to a directory, then you have access to all files and subdirectories too.
I think you’ll need to implement something yourself in PHP if you need more sophisticated authentication capabilities.
Or just don’t put the things for which you need a second set of credentials in a subdirectory.