【发布时间】:2010-11-05 11:51:43
【问题描述】:
我需要专家的帮助。
我正在尝试混合两个文件 htaccess
第一个:
<IfModule mod_mime.c>
<FilesMatch "\.html\.gz$">
ForceType text/html
FileETag None
</FilesMatch>
AddEncoding gzip .gz
AddType text/html .gz
</IfModule>
<IfModule mod_deflate.c>
SetEnvIfNoCase Request_URI \.gz$ no-gzip
</IfModule>
<IfModule mod_headers.c>
Header set Cache-Control 'max-age=300, must-revalidate'
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html A300
</IfModule>
第二个:
<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
<FilesMatch "\.(js|css|pdf|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
第一个文件被插件 wp-supercache (worpress) 使用
我想要那个
image files Cache-Control = 2592000
files as css e js Cache-Control = 604800
files htm had Cache-Control = 43200
但它不想失去插件的功能,因此我寻求帮助。
非常感谢,请原谅我的英语
维拉
【问题讨论】:
-
找到解决方案了吗?如果您仍然遇到问题,请查看我的回答,这可能是因为 Apache2 中缺少模块。