wp为文件增加过期时间

Posted on Posted in wordpress
Tips: 本文创建于2014年8月26日,已超过 2 年,内容或图片可能已经失效!

为文件添加过期时间
只需要在网站的.htaccess文件中加入以下代码

[code lang="bash"]
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A600
ExpiresByType image/x-icon A2592000
ExpiresByType application/x-javascript A604800
ExpiresByType text/css A604800
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType text/plain A86400
ExpiresByType application/x-shockwave-flash A2592000
ExpiresByType video/x-flv A2592000
ExpiresByType application/pdf A2592000
ExpiresByType text/html A600
</IfModule>
[/code]

» 转载请注明来源:若我若鱼 » wp为文件增加过期时间

Leave a Reply

Your email address will not be published. Required fields are marked *

eleven + seven =