.htaccess to restrict access to only select files
Posted
by Bryan Ward
on Super User
See other posts from Super User
or by Bryan Ward
Published on 2010-06-16T04:13:22Z
Indexed on
2010/06/16
4:13 UTC
Read the original article
Hit count: 314
I have a directory in my webserver for which I would like to serve up only pdf files. I found I can restrict access using the .htaccess, and using something like
<FilesMatch "\.(text,doc)">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
to serve up everything except a regular expression. Is it possible to instead restrict access to only files which meet some regular expression?
© Super User or respective owner