php项目 .htaccess文件配置如下:

#文件缓存时间配置
<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf|js|css)$">
    Header set Cache-Control "max-age=600"
</FilesMatch>

 

.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

信息提示  有模块丢失。

解决办法:

在Apache的配置文件 httpd.conf 中开启(去掉前面的#)  LoadModule headers_module modules/mod_headers.so  即可解决这个问题。

相关文章:

  • 2021-04-03
  • 2021-07-27
  • 2021-11-26
  • 2021-05-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-15
  • 2021-05-16
  • 2021-08-03
  • 2022-12-23
  • 2021-05-01
  • 2021-12-13
相关资源
相似解决方案