-2

I want to exclude access to certain files using .htaccess files but i need help generating the correct regexp.

I want to exclude access to these two files:

soft1-pp_1.12-123456789010_amd64.deb
soft1-tt_1.12-123456789010_amd64.deb

Version numbers are changing (1.12-123456789010) and I want the FilesMatch to work even after the versions change. What's the correct RegExp for it?

My .htaccess will be as following:

<FilesMatch "^(filename1|filename2)\.deb$">
        Order allow,deny
        Deny from all
        Allow from 127.0.0.1
</FilesMatch>
1
  • Usually people will be more willing to help if you show what you've tried so far.
    – Jenny D
    Jun 18, 2013 at 13:19

1 Answer 1

0

Try this regexp:

^soft1-(pp|tt)_[.0-9-]*_amd64\.deb$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .