Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 http://www.pactsoftware.nl/tools/joomla-optimization.html

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

1 Answer 1

Need checking Apache config file about 2 points:

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

    LoadModule expires_module modules/mod_expires.so

  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
    </Directory>
    
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

 
discard

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.