当前位置:Gxlcms > 数据库问题 > .htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

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

时间:2021-07-01 10:21:17 帮助过:27人阅读

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  即可解决这个问题。

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

标签:解决   config   丢失   max-age   match   jpg   blog   set   comm   

人气教程排行