<FilesMatch> directive

Description: Enclose directives that apply to matched filenames
Syntax: <FilesMatch regex> ... </FilesMatch>
Context: server config, virtual host, directory, .htaccess

 

The <FilesMatch> directive is exactly the same as <Files ~> syntax.

<FilesMatch "\.(gif|jpe?g|png)$">


Don't forget to include RewriteEngine on directive in every <VirtualHost> tag or enclosed rules will not be applied.