无效命令 'AddOutputFilterByType',可能拼写错误或由未包含在服务器配置中的模块定义

Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration

我是 运行 带有 wamp 2.5 的 prestashop 1.4,我正在获取错误文件 (.htaccess)

Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration

我在之前的安装(wamp 2.4)中没有得到它

我读了这个

Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration - AddOutputFilterByType has moved from the core to mod_filter, which must be loaded.

在 apache 网站上,不知道是什么意思。

自动创建 htaccess 的任何方式。

在 apache 中启用“filter_module”模块。

[Wamp 图标] > Apache > Apache 模块 > filter_module

降级到 wamp 2.4 将避免但不会解决问题。启用 filter_module 允许在 wamp 2.5

上支持 AddOutputFilterByType htaccess

您可以更改 .htaccess 以首先检查过滤器模块是否启用,然后应用属性。

<IfModule mod_filter.c>
AddOutputFilterByType ...
</IfModule>

要解决此问题,请启用 mod_filter 并重新启动 Apache。 mod_filter 在 2.4 中是必需的,尽管在 2.2 中不是这样。

要启用它,请打开您的 httpd.conf 文件并取消注释行

LoadModule filter_module modules/mod_filter.so

然后重启Apache服务,大功告成。

来源:https://www.nivas.hr/blog/2012/08/10/upgrade-to-apache-2-4-and-addoutputfilterbytype-issue/