Invalid command ‘Header’ in htaccess

You might encounter an error in your /etc/apache2/error.log stating:

 

[Tue Feb 01 00:57:02 2011] [alert] [client 192.168.1.102] /home/cliper/lampen/.htaccess: 
Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

This is because mod_rewrite is not loaded. In my case, I suspected that mod_headers was not enabled.

So in terminal I did

 

a2enmod headers

 

and restart apache2

 

/etc/init.d/apache2 restart

 

For hosted sites, you might contact your system administrator or in your cpanel.

 

System: Debian

Apache ver: 2.2.9 (Debian)

 

 

Leave a Reply