[users@httpd] .htaccess and case-insensitive regular expression matching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hi,
I'm trying to create a .htaccess file that will reside in an /images
directory. I want the .htaccess file to only deny access to
everything EXCEPT image files (gif, jpg, bmp, png, etc). I've
searched the web, apache manual, and PCRE manual for hours but for
the life of me I can't get the regular _expression_ to do a
case-insensitive match with the FilesMatch directive. The file I
created below does this trick so long as the file extension is
lower-case. I tried changing the regular _expression_ below to
"(?i)\.(gif|jpe?g|png|bmp)$" and "\.(?i:gif|jpe?g|png|bmp)$" but that
causes an internal server error. The web server is running Apache
1.3 on FreeBSD 4.7.
.htaccess file:
Deny from all
<FilesMatch "\.(gif|jpe?g|png|bmp)$">
Allow from all
</FilesMatch>
Thanks for your help!
John
[Index of Archives]
[Open SSH Users]
[Linux ACPI]
[Linux Kernel]
[Linux Laptop]
[Kernel Newbies]
[Security]
[Netfilter]
[Bugtraq]
[Squid]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Samba]
[Video 4 Linux]
[Device Mapper]