I had to apply an ExpiresDefault directive to a single file. This is surprisingly difficult and differ between Apache versions. I have come up with two solutions, see https://serverfault.com/questions/914295/how-to-apply-an-expiresdefault-directive-to-a-single-file-excluding-similar-fil/914443#914443 First solution: <If "%{REQUEST_FILENAME} == '%{DOCUMENT_ROOT}/index.html'"> ExpiresDefault "access plus 1 hours" </If> This works in a .htaccess file, but it is awkward, because the right side of the condition must include the path to the .htaccess file. The directory should be implicit from the location of the .htaccess. This example is the best case, in a wronger case the expression would be something linke %{DOCUMENT_ROOT}/alfa/beta/index.html, if the .htaccess file is in alfa/beta. The second solution: <DirectoryMatch "^/srv/www-example-com/[^/]*$"> <Files "index.html"> ExpiresDefault "access plus 1 hours" </Files> </DirectoryMatch> This does not work in .htaccess. It is also very verbose. It also shows a bug in this Apache HTTPD version (2.4.18): DirectoryMatch matches the full path of URL, including the last file name part. This is why the closing /[^/]* expression is required before the $ sign. Otherwise it would not match the www.example.com/index.html URL. What I would expect is something like: <File file1 file2 file3> ExpiresDefault "access plus 1 hours" </File> which does not match files in subdirectories, only the current directory in .htaccess. it works for multiple files, and it is short. If used in a virtual host context, then file1 must include the absolute path.