httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pablo Garcia Melga <mal...@gmail.com>
Subject [users@httpd] Header modification problem with mod_rewrite, mod_headers and PHP
Date Wed, 19 May 2010 13:41:43 GMT
Hello,

 I'm struggling with a configuration that doesn't seems to work
I have an httpd 2.2.15 running on RHEL 5.3 loaded with mod_rewrite,
mod_headers, mod_expires and php


I have configured this rewrite rule
RewriteRule "/c([0-9]+)-([a-zA-Z/-]+)-p([0-9]+)(.*)"
"/nl_listado.php?categoria=$1&pagina=$3"

Works fine, no problem.
Now I want to remove all cache-related headers sent by the php and set my own.
So I put these lines in the config.

<Files nl_listado.php>
Header unset set-cookie
Header unset Expires
Header unset cache-control
Header unset Pragma
Header set cache-control "public"
Header append cache-control "max-age=1200"
</Files>
<FilesMatch "/c([0-9]+)-(.*)">
Header unset set-cookie
Header unset Expires
Header unset cache-control
Header unset Pragma
Header set cache-control "public"
Header append cache-control "max-age=1200"
</FilesMatch>

Neither of these seems to work as expected, instead I get a mixed response.

This are the response headers without the sections

Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0, no-cache
Expires: -1
Pragma: no-cache

And this are the response headers after I place the above configuration.

Cache-Control: public, max-age=1200, no-cache
Expires: -1
Pragma: no-cache


I've tried with different versions of httpd, also compiling the
modules statically, but I found no way to make this works.
The weird thing is that the mod_headers kicks in and append the
"public, max-age=1200" to the response, but doesn't remove the
no-cache, Expires and Pragma headers.
Any ideas ?



Regards, Pablo

---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message