I have the following code to protect files with password in .htaccess
:
<FilesMatch "\.(html|htm|css|js|php|swf|swz|xml|ico|jpg|jpeg|png|txt)$">
AuthName "Member Only"
AuthType Basic
AuthUserFile /path/to/password/.htpasswd
require valid-user
</FilesMatch>
How can I exclude from here the should_be_excluded.php
from being password protected?
I can change the protection lines if needed, but I think that something could be done in the regex?
how about something like:
<FilesMatch "\.(html|htm|css|js|php|swf|swz|xml|ico|jpg|jpeg|png|txt)$">
AuthName "Member Only"
AuthType Basic
AuthUserFile /path/to/password/.htpasswd
require valid-user
</FilesMatch>
<Files /should_be_excluded.php>
Order Allow,Deny
Allow from all
</Files>
this should allow ALL access to the excluded file?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With