I have used this before;
<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "now plus 2 weeks" // Lots omitted here </IfModule>
And this:
<IfModule mod_headers.c> <filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|JPG)$"> Header set Cache-Control "max-age=1209600" </filesMatch> // Lots omitted here </IfModule>
I can set the expire by type of content, and I can set any header I want with the file extension.
But none of them seem to allow you to set any title you want by content type.
I want to set the cache control header based on the type of response content - note that this is not the same as the file extension. I have "friendly URLs", so there is no file extension that filesMatch should filesMatch , so there is no file extension, but the content type is text/html .
How to set cache control header for certain types of content?
content-type header apache apache2
Jake n
source share