.htaccess - apache | FilesMatch and Indexes - hide all files with exception -


i have folder indexes option. have hide files in listing directory except (jpe?g|pdf|bmp|png|html|css).

but config not working). me,please fix it.

<directory /home/*/downloads>     allowoverride     options multiviews indexes symlinksifownermatch includesnoexec   <filesmatch "\.(htaccess|jpe?g|pdf|bmp|png|html|css)$">     order allow,deny     allow </filesmatch>  <filesmatch "">     order deny,allow     deny </filesmatch>  </directory> 

p.s. apache 2.2

change order of filesmatch directives, i.e. block first allow type of files later:

<filesmatch "">     order deny,allow     deny </filesmatch>  <filesmatch "\.(htaccess|jpe?g|pdf|bmp|png|html|css)$">     order allow,deny     allow </filesmatch> 

Comments