开发者

Problem with FilesMatch not matching correctly

We are having an issue with FilesMatch, it does not seem to be matching some file types. We are using the FilesMatch directive to allow me to add custom headers using mod_headers, config file details snippit below:

<FilesMatch  \.(list|dept|png|html|htm)>
Header set Last-Modified  "Mon, 01 Jan 2000 00:00:00 GMT"
Header set Expires "Mon, 01 Jan 2000 00:00:00 GMT"
Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
Header set Pragma "no-cache"
</FilesMatch>

We are using mod_jk to pass connections to Tomcat and the Struts to rename the files to .dept & .list ,etc.

The issue appears to be with matching the text/html , as files that are being served as files with .png (used in the regex match for sanity check) are matching fine.

Is 开发者_开发技巧there a specific file extension that I should be trying to match in Apache when the files are being renamed with Struts?


I have managed to resolve the issue by using LocationMatch

<LocationMatch "\.(html|htm|shtml|shtm|txt|text)$" >
Header set Custom-Header1
....
</LocationMatch>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜