I’m using this .htaccess
AuthName "Reserved Area"
AuthType Basic
AuthUserFile /opt/bitnami/apache2/htdocs/k4demo60/.htpasswd
AuthGroupFile /opt/bitnami/apache2/htdocs/k4demo60/.htgroup
<FilesMatch ".(jpg|php|swf|htm|html|pdf|PDF|JPG|msg|css|js|inc|gif|png)$">
Order Deny,Allow
Require group -1 1 3 4
</FilesMatch>
<FilesMatch ".(register.php|remind.php|changepwd.php)$">
Order Deny,Allow
require valid-user
</FilesMatch>
in brief I want to enable access for all valid users to the three files shown. The access to other files in the same directory should be allowed only to certain groups of users.
Unfortunately the presence of the first rule is such as to allow access to files: register.php | remind.php | changepwd.php only to the groups of authorized users.
I would avoid putting register.php | remind.php | changepwd.php in a separate directory, how can I solve the problem?
this is a solution that works:
I’m only wondering if there is a smarter solution.