Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Invalid command 'Header' in .htaccess

2 views
Skip to first unread message

Matthias

unread,
Nov 12, 2009, 4:15:20 PM11/12/09
to
Hi,

I want to disable caching for a specific directory on my server.
Therefor I have a .htaccess in this directory, starting with:

Header append Cache-Control "no-cache"
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
ErrorDocument 401 /test/index.html

But this do not work :-(
I get an error in /etc/apache2/error.log:
[Thu Nov 12 21:50:58 2009] [alert]
[client ::1] /var/www/auth2/secure/.htaccess: Invalid command 'Header',
perhaps misspelled or defined by a module not included in the server
configuration, referer: http://localhost/test/

Thanks for any hint,
Matthias
--
Don't Panic

HansH

unread,
Nov 12, 2009, 4:42:28 PM11/12/09
to

"Matthias" <matthia...@gmx.li> schreef in bericht
news:12580605...@news.aic.at...

> Header append Cache-Control "no-cache"
> BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
> ErrorDocument 401 /test/index.html
>
> But this do not work :-(
> I get an error in /etc/apache2/error.log:
Odd place for this log, what's your distro?

> [Thu Nov 12 21:50:58 2009] [alert]
> [client ::1] /var/www/auth2/secure/.htaccess: Invalid command 'Header',
> perhaps misspelled or defined by a module not included in the server
> configuration, referer: http://localhost/test/
>

Most probably mod_headers had not been loaded.
While you are at it check for mod_setenvif too.

HansH


Matthias

unread,
Nov 21, 2009, 7:58:21 AM11/21/09
to
HansH wrote:

Hi,
sorry, the log is in /var/log/apache2/error.log.
Right. mod_header is available but not enabled.

Thanks

0 new messages