Forum Moderators: phranque

Message Too Old, No Replies

FIlesmatch not condition

Trying to match non-image files.

         

motorhaven

3:37 pm on May 18, 2006 (gmt 0)

10+ Year Member Top Contributors Of The Month



Due to numerous reasons, I cannot use a filesmatch directory to match on certain file types. Rather, I need to "not match" only on image files.

This is what I've tried

<FilesMatch!"\.(jpg¦png¦gif)$">
....
</FilesMatch>

But it doesn't seem to work correctly. I want to use the FilesMatch directive to match all non jpg, png and gif files.

Anyone know how to do this?

jdMorgan

9:22 pm on May 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried:

<FilesMatch [b]"!\.[/b](jpg¦png¦gif)$">
....
</FilesMatch>

I'm not sure that using "!" for NOT works with FileMatch, but if it does, it will probably need to be inside the quotes.

Jim