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

Enable the 'filter_module' module in apache.

[Wamp icon] > Apache > Apache modules > filter_module

Downgrading to wamp 2.4 will avoid but not solve the problem. Enabling filter_module allows for AddOutputFilterByType htaccess support on wamp 2.5


To fix this, enable mod_filter and restart Apache. mod_filter is required in 2.4, although in 2.2 was not the case.

To enable it, open your httpd.conf file and uncomment the line

LoadModule filter_module modules/mod_filter.so

Then restart the Apache services and you're done.

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


You can change your .htaccess to initially check if the filter module is enabled or not, and then apply the attributes.

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

Tags:

Wamp