Hi,
Something like this in httpd.conf works for me:
<IfModule mod_headers.c>
<LocationMatch \.(js|gif|jpe?g|css)>
Header append "Cache-Control" "public"
</LocationMatch>
<LocationMatch \.s?html>
Header append "Cache-Control" "private"
</LocationMatch>
</IfModule>
so without the LocationMatch it could handle everything I think.
Jeremy
-----Original Message-----
From: Mohammed Salih [mailto:[EMAIL PROTECTED]
Sent: 21 April 2008 13:09
To: [email protected]
Subject: [EMAIL PROTECTED] Adding a Header to the httpd response
Hi All,
How can I add a header, if it is not set by the application.
I want to add Cache-Control header to all http responses, if it is not
set by the back-end application like PHP or application server like
tomcat.
I tried a combination of SetEnvIf and Header, but SetEnvIf is only
fused for requests.
Can any one please guide me in the right path? (Sorrmy English is poor)
Thanks in advance.
Salih
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------
This email has been scanned for viruses and other threats
using Newsquest's Ironport email filters
This e-mail, including any attachment, is private and
confidential.
It should not be read, copied, disclosed or otherwise used by
any person other than the intended recipient(s).
If you have received this e-mail in error, please notify the
sender immediately.
Newsquest reserves the right to monitor e-mails in
accordance with the Telecommunications (Lawful Business
Practice)
(Interception of Communications) Regulations 2000.
Newsquest Limited.
Registered in England, number 3105111 . Registered office:
58 Church Street, Weybridge, Surrey KT13 8DP
--------------------------------------------------------------------
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]