Here's a picture of a folder inside the root directory my website:
I want to have htaccess require an authentication to access any of these folders. So no one can type in www.domain.com/Folder/CSS
and access it without the correct username and password. So far I've tried:
<DirectoryMatch "^*">
AuthType Basic
AuthName "Login"
AuthUserFile /disks/*/*/Folder/.htpasswd
Require valid-user
</DirectoryMatch>
This is to make it secure all the subdirectories (classes, cs, images, js
) but instead when I type in www.domain.com/Folder/Front.php
it comes up with:
Internal Server Error
With no console error. How do I make htaccess authenticate all the subdirectories (BUT NOT FRONT.PHP!)?