问题描述
|
如何在htaccess中添加模式过期条件
解决方法
您需要确保已启用“ 0”模块,然后使用以下命令:
ExpiresActive on
ExpiresDefault \"access plus 1 month\"
您还可以根据内容类型添加过期时间,有关更多信息,请参阅Apache文档:http://httpd.apache.org/docs/current/mod/mod_expires.html
,我假设你的意思是mod_expire。
是的,您可以将这些指令添加到.htaccess中。只要您设置了AllowOverride
http://httpd.apache.org/docs/2.0/mod/mod_expires.html