Forum Moderators: phranque
Options +Indexes
Order Deny,Allow
<Files *>
Deny from All
</Files>
<FilesMatch ".*temp\.pdf$">
Allow from All
</FilesMatch>
<FilesMatch ".*cat1\.pdf$">
Allow from All
</FilesMatch>
It might be helpful to know that the directory contains many pdf files but we only want ones that end in temp.pdf or cat1.pdf to be visable.
The parent directory contains a working .htaccess. As a test, I modified that .htaccess to include the following (which also produced a 500 internal server error):
<Files .htaccess .htpasswd .htuser .htgroups *.pdf>
order allow,deny
deny from all
</Files>
The files were all written on a Unix box with vi. Could there be a global config setting that does not allow <Files> or other directives? If so what would that be? If there is a problem with the .htaccess file what is it?
many thanks!
D.
Check out the AllowOverride [httpd.apache.org] settings. You'll need AllowOverride FileInfo at a minimum.
Jim
<Directory>
AllowOverride All
</Directory>
in the .htaccess located in the one that contains the pdf files and still got the 500 error. That directory is named pdf. I placed the following in pdf's parent's .htaccess
<Directory pdf>
AllowOverride All
</Directory>
This also gave a 500 error. Am I just doing something wrong?
Note: AllowOverride is only valid in <Directory> sections, not in <Location> or <Files> sections, as implied by the Context section above.
<Directory> directive
Syntax: <Directory directory-path¦proxy:url-path> ... </Directory>
Context: server config, virtual host
AllowOverride is configured in httpd.conf.
Jim