Thursday, March 13, 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

posted on Thursday, March 13, 2014 6:22:13 PM (South Africa Standard Time, UTC+02:00)  #    Trackback
Related posts:
MyBB Block (Bad) Robots - Part 2
MyBB Block Robots - Part 1
myBB 1.6 Thread Tooltip Preview
myBB Updates