Thursday, 13 March 2014
If you need to cache static content in one of your sub folders use the following snippet of code placed into an htaccess file.
What this code will do is cache the content for 2 days (172800 seconds) and not request the content again unless it has changed.
Additionally as per the comments, it will only cache PHP files if they specifically send their own cache headers.

FileETag MTime Size
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A172800

  <FilesMatch \.php$>
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers set by mod_expires if they want another caching behavior.
    ExpiresActive Off
  </FilesMatch>
</IfModule>


posted on Thursday, 13 March 2014 18:22:13 (South Africa Standard Time, UTC+02:00)  #    Comments [1] Trackback
Related posts:
MyBB Block (Bad) Robots - Part 2
MyBB Block Robots - Part 1
myBB 1.6 Thread Tooltip Preview
myBB Updates
Tuesday, 22 April 2014 05:50:26 (South Africa Standard Time, UTC+02:00)
Hola, la herramienta pidgom, bastante completa, no me coge el cf3digo tuyo para l htaccess. Este ficho tambie9n lo uso para las pretty url, puede haber algfan tipo de incompatibilidad? Gracias Un saludo!
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):