【发布时间】:2016-07-07 10:47:13
【问题描述】:
我使用 Zend 框架,我有很多这样的 CSS 文件
如何为 css.php 设置过期标头? 事实上,我的 .htaccess 无法使用它。
我的 .htacess :
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year”
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access 1 month”
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>
谢谢
【问题讨论】:
标签: php css performance mod-expires expires-header