7 Increase the "Expires" header I am trying to optimize a Drupal 7 site. I noticed the Expires header is set to just 6 hours, although according to my .htaccess file, it should be 2 weeks. Then i found out mod_expires module is not enabled. Now i have two questions:


Since i don't have the necessary rights, is there a way to set the Expires header without enabling mod_expires?
What is setting the header to 6 hours?


EDIT: Another strange thing is that the header is not there at all for some of the css files.

Also the settings in my /admin/config/development/performance is as follows, if related to this:

Cache pages for anonymous users: checked
Cache blocks: checked
Minimum cache lifetime: none
Expiration of cached pages: 1 day
Here is some boilerplate Apache rules I came up with for this question based off of the rules found in the advagg readme. The inverted files match is untested but based off this post: https://stackoverflow.com/questions/12926604/inverted-filesmatch; got what needed to be excluded by looking at core's .htaccess

&lt;FilesMatch "(?&lt;!\.php)$"&gt;
  # No mod_headers
  &lt;IfModule !mod_headers.c&gt;
    # No mod_expires
    &lt;IfModule !mod_expires.c&gt;
      # Use ETags.
      FileETag MTime Size
    &lt;/IfModule&gt;
  &lt;/IfModule&gt;

  # Use Expires Directive.
  &lt;IfModule mod_expires.c&gt;
    # Do not use ETags.
    FileETag None
    # Enable expirations.
    ExpiresActive On
    # Cache all files for 2 weeks after access (A).
    ExpiresDefault A1209600
  &lt;/IfModule&gt;

  &lt;IfModule mod_headers.c&gt;
    # Do not use etags for cache validation.
    Header unset ETag
    &lt;IfModule !mod_expires.c&gt;
      # Set a Cache-Control header to 2 weeks.
      Header set Cache-Control "max-age=1209600, no-transform, public"
    &lt;/IfModule&gt;
    &lt;IfModule mod_expires.c&gt;
      Header append Cache-Control "no-transform, public"
    &lt;/IfModule&gt;
  &lt;/IfModule&gt;
&lt;/FilesMatch&gt;


In your case the best you can do is to use ETags. 

Note: If you happen to be serving all you static file assets from a CDN then you could enable far-future headers in the CDN module. Doing it this way will route almost all static file traffic through PHP (on a origin request) so it can be extremely damaging to the sites performance if you are not using a CDN.