I need to set cache control headers for index.htm files Unfortunately the following configuration does not work. The reason when the user access “/” in a browser the server response with index.htm even it does not appear in the request.
<filesMatch "(index.htm)$">
<ifModule mod_headers.c>
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</ifModule>
</filesMatch>
How can I set cache control cookies?
Use
LocationMatch
instead ofFilesMatch
: