I've searched quite a few places on the web, without finding a definite solution. If FilesMatch is case sensitive, how can I make it case insensitive?
apache.org gave the example:
<FilesMatch \.(?i:gif|jpe?g|png)$>
Order allow,deny
Deny from all
</FilesMatch>
But using ?i: only gave internal server errors.
I know with php, I could do something like this (using /i):
'/(jpe?g|gif|png)$/i'
I decided to try it with expires headers (this was just a test).
ExpiresActive On
ExpiresDefault A259200
# Set up caching on media files for 1 month
<FilesMatch "\.(ico|gif|jpe?g|png|flv|pdf|swf|mov|mp3|wmv|ppt)$/i">
ExpiresDefault A29030400
Header append Cache-Control "public"
</FilesMatch>
This did not return any errors and YSlow gave the OK for expires headers. But is this correct. What about these two?
<FilesMatch "\.(i:ico|gif|jpe?g|png|flv|pdf|swf|mov|mp3|wmv|ppt)$">
<FilesMatch "\.(ico|gif|jpe?g|png|flv|pdf|swf|mov|mp3|wmv|ppt)$i">
Neither of the two above caused any errors and YSlow gave the OK for expires headers as well. Sorry, I'm not that good with regular expression and any help would be greatly appreciated.