Invalid command 'Header' in htaccess

by cliper Tuesday, February 01, 2011 12:05 PM

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)

 

...

 

Tags:

Apache 2 | Linux | Tips/Tricks | Web Hosting

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



About the author

Author's PhotoI enjoy web developing and would like to share my thoughts of it.

Send mailE-mail me

Most comments

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar