0

I put this in httpd.conf

Reloaded apache.

<FilesMatch "\.(gif|jpe?g|png)$">
  Order allow,deny
  Deny from all
</FilesMatch>

I'm expecting no files to be accessible from browser except image files, but I can access no probs test.php

what am I doing wrong?

1 Answers1

2

You've got it backwards. That config denies access to all image files and allows access to all other files.

You can create negative regular expressions to do what you want or you can change the order (and hence logic) of your allow,deny directives.

Ladadadada
  • 25,847
  • 7
  • 57
  • 90