This .htaccess
file:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 4 month"
</IfModule>
<IfModule mod_headers.c>
Header merge X-ModHeaders "Yes, it is installed"
</IfModule>
... works as expected in my development box (Windows box, Apache/2.4.10, PHP running as Apache module), where "works" means that it generates the appropriates headers for all resources (static or dynamic).
However, in my production server (Linux box, Apache/2.2.31, PHP running as FastCGI with mod_fcgid/2.3.9) it only works for static assets, not for PHP scripts.
Am I right suspecting that difference comes from the PHP SAPI? Is there a way to fix it so I don't need to duplicate the code that generates HTTP headers?
Header always merge X-ModHeaders "Yes, it is installed"
? – Assay