1

I am trying to disable Apache authentication for certain files, but I don't seem to get it right. This is what I have on .htaccess:

AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/home/site/.htpasswd"
Require valid-user

<FilesMatch "\.(ico|gif|jpg|png|mp3|js|css|json|xml)$">
    Satisfy any
    Allow from all
</FilesMatch>

Any ideas?

Raisen
  • 141
  • 10
  • It looks right. Do you have any `Require valid-user` directives in other sections such as `` or ``, that might take precedence? – Andrew Schulman Nov 05 '14 at 09:14
  • What makes strange is that I don't have any other directive. If I use , authentication gets disabled for all files, but it just doesn't work when I specify the files extensions. – Raisen Nov 06 '14 at 08:27
  • Case problem? Your files are named e.g. .jpg and not .JPG, right? – Andrew Schulman Nov 06 '14 at 08:56

0 Answers0