Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Joomla site that I am trying to enable caching using mod_expires. I have the .htaccess in the root of the site and have added the options as found on the page

Using the PageSpeed extension in Chrome, prior to adding this in my .htaccess, my site scores a 55 (Caching is at the top, and lists a lot of images, CSS, and JS files). After these directives, it scores 70, with caching in the yellow, but still lists some image files (some are two directories deep and the rest are four).

I checked for any other .htaccess files in the Joomla root, but none are between those folders and the root. It is almost as if .htaccess only works in that one directory, not the subfolders.

I have tried putting a .htaccess in each affected subdirectory, but it does not work.

Does anyone have any ideas?

share|improve this question

Need checking Apache config file about 2 points:

  1. mod_expires is enable or not? Uncomment the line like this:

    LoadModule expires_module modules/

  2. DocumentRoot is allow overriding config where .htaccess placed or not? Like this:

    <Directory "/path/to/your/docroot">
        AllowOverride All
        Order allow,deny
        Allow from all
share|improve this answer
It is a shared host so I don't have access to a conf file. It appears to be loaded because the directives are within an IfModule, and caching does occur for most of the files. It is just a select few that are "deep" in the directory that don't work – keyboarddrummer Jul 25 '11 at 16:03
Don't worry about caching, modern browsers handle it by themselves. Can do nothing. – Artiya4u Jul 25 '11 at 16:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.