I found the problem:
CakeResponse class sets headers that defines content-type and expire date
time that overwrite .htaccess instructions, even for assets.
Example:
public function cache($since, $time = '+1 day') {
if (!is_integer($time)) {
$time = strtotime($time);
}
$this->header(array(
'Date' => gmdate("D, j M Y G:i:s ", time()) . 'GMT',
'Last-Modified' => gmdate("D, j M Y G:i:s ", $since) . 'GMT',
'Expires' => gmdate("D, j M Y H:i:s", $time) . " GMT",
'Cache-Control' => 'public, max-age=' . ($time - time()),
'Pragma' => 'cache'
));
}
Is there a Cake way to set different expire dates based to resource type or
to disable this headers so i can use .htaccess file?
Thanks in advance
--
Dott. Stefano Zoffoli
*Web Development & Internet Technologies
*
*Librasoft Snc
*http://www.librasoftsnc.it
Via della Luna, 13
47034 Forlimpopoli (FC)
Tel. +39 0543 424612
Fax +39 0543 424612
2011/12/13 AD7six <[email protected]>
> Ask on an apache list?
>
> Since those headers are only sent if the appropriate modules are
> loaded either there's an error in how you added the rules (like not
> adding it to the right file) - or the required modules don't exist and
> therefore the rules are not executed.
>
> In any event this has little to do with cakephp
>
> AD
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php