Hi All,
I'm trying to configure an htaccess file on Apache so that I can protect a directory which looks like this;
Basically, the problem that I have is that I need to be able to make the / NOT require authentication, but everything else in that tree to still require it.
I was hoping that I'd be able to do something like;
and thus require authentication, but allow requests to any file that ends in .css to be let through *without* authentication.
Can this be done?
Thanks,
Beau
I'm trying to configure an htaccess file on Apache so that I can protect a directory which looks like this;
Code:
www/
[URL unfurl="true"]www/.htaccess[/URL]
[URL unfurl="true"]www/index.html[/URL]
[URL unfurl="true"]www/page.php[/URL]
[URL unfurl="true"]www/admin[/URL]
[URL unfurl="true"]www/admin/config.php[/URL]
[URL unfurl="true"]www/css[/URL]
[URL unfurl="true"]www/css/style.css[/URL]
Basically, the problem that I have is that I need to be able to make the / NOT require authentication, but everything else in that tree to still require it.
I was hoping that I'd be able to do something like;
Code:
AuthName "Secured"
AuthType basic
AuthDBUserFile /share/htacces/users.db
<Limit GET POST PUT>
require valid-user
</Limit>
<FilesMatch ~ "\.css$">
Order allow,deny
Deny from none
Allow from all
</FilesMatch>
and thus require authentication, but allow requests to any file that ends in .css to be let through *without* authentication.
Can this be done?
Thanks,
Beau