Forum Moderators: phranque
<FilesMatch "^t\.cgi$">
ExpiresActive on
ExpiresDefault A1
Header unset Cache-Control
Header set Cache-Control: "no-store, no-cache, must-revalidate"
Header unset Expires
Header set Expires "Thu, 01 Dec 1994 16:00:00 GMT"
</FilesMatch>
then i did sudo /l/apache/bin/apachectl configtest then sudo /l/apache/bin/apachectl graceful
when i open the url [xyz.com...] (i m printing headers in t.cgi)
i get the following output:
200 OK Date: Wed, 20 Apr 2005 16:08:13 GMT
Server: Web Server/1.3.28 (Unix) mod_ssl/2.8.15 OpenSSL/0.9.7c mod_gzip/1.3.26.1a mod_security/1.6 mod_jk/1.2.5 ApacheJServ/1.1.2
Cache-Control:
Expires:
Last-Modified: Sat, 16 Apr 2005 08:09:03 GMT
Etag: "f05478-98-4260c81f"
Content-Length: 152
Content-Type: text/html
why the Expires and Cache fields is empty? it means it is still caching data
[ol]
$ telnet 192.168.1.1 80
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
HEAD /cgi-bin/t.cgi HTTP/1.0
Host: www.example.comHTTP/1.1 200 OK
Date: Thu, 21 Apr 2005 01:38:41 GMT
Server: Apache
Cache-Control: no-store, no-cache, must-revalidate
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Connection: close
Content-Type: text/html
Connection closed by foreign host.
This may or may not give you more accurate information regarding what headers the server is returning. I'd try setting a bogus header, such as:
Header set "X-Foo" "Bar"
If you see that in the output headers, you know your .htaccess file is being properly parsed; the next step is to figure out why your headers are being removed. Is it possible that another module is removing them? Are there any proxies between your browser and the server?