WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: WP Super Cache] httpd.conf or .htaccess for Apache Directives? (20 posts)

  1. webmaestro
    Member
    Posted 5 years ago #

    We've implemented WP Super Cache 0.8.2 in our WordPressMU 2.6.1 install, and are having intermittent success seeing 'cached' pages (see [Plugin: WP Super Cache] Not all pages are returned cached).

    NOTE: We haven't seen any caching for any posts.

    Our issue is similar to another recent forum post
    [Plugin: WP Super Cache] How do I know it's really caching?.

    But this post isn't about those questions... ;-) This post hopes to answer the question, and perhaps outline the steps to implement WP Super Cache, and place all Apache Directives (RewriteCond, RewriteRule, etc.) in the Apache virtual conf file, instead of in the DOCROOT/.htaccess and DOCROOT/wp-content/cache/.htaccess files.

    Our Network & System Ops folks encourage us to place RewriteRule and other Apache Directives in the httpd virtual .conf file(s) where possible. FWIW, AllowOverrides All is specified, but not currently in use.

    I've attempted to enable WP Super Cache by creating the DOCROOT/.htaccess and DOCROOT/wp-content/cache/.htaccess files as WP Super Cache seems to expect (not placing the Directives in the httpd virtual conf file). The home page of each blog loaded, but I immediately received errors when accessing any POSTS.

    I tried placing the contents of both DOCROOT/.htaccess and DOCROOT/wp-content/cache/.htaccess files into the httpd virtual conf file (see code below), and the pages loaded slowly, but I was unable to see the <!-- super cache --> lines (see this post).

    I was most successful placing the DOCROOT/.htaccess content in the httpd virtual conf file but creating the DOCROOT/wp-content/cache/.htaccess file. The results were the same as above (see this post), but it felt snappier.

    Any ideas?

    <VirtualHost *>
      ServerName www.domain.com
      ServerAlias domain.com
      ServerAdmin support@domain.com
      DocumentRoot /path/to/wordpress-mu-X.Y.Z/
    
      LogLevel warn
      ErrorLog /var/apache/logs/wpmu_error_log
      CustomLog /var/apache/logs/wpmu_access_log combined
      RewriteLog "/var/log/apache/rewrite.log"
      RewriteLogLevel 0
    
      <Directory "/path/to/wordpress-mu-X.Y.Z">
        AllowOverride All
        Order Deny,Allow
        Allow from all
    
        RewriteEngine On
    
        FileETag INode MTime Size
        #ExpiresActive On
        #ExpiresDefault "modification plus 30 minutes"
        #<FilesMatch "\\.(html|htm|php|jpg|gif|txt)$">
        #Header set Cache-Control "max-age=1h, only-if-cached"
        #</FilesMatch>
    
        RewriteBase /
        RewriteRule ^(.*/)?files/$ index.php [L]
        RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    
        RewriteCond %{REQUEST_URI} ^.*/wp-admin$
        RewriteRule ^(.+)$ /$1/ [R=301,L] 
    
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule . - [L]
        #RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
        RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
        RewriteRule . index.php [L]
    
        # BEGIN WPSuperCache
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} !.*=.*
        RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
        RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
    
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} !.*=.*
        RewriteCond %{QUERY_STRING} !.*attachment_id=.*
        RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
        RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
        RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.php [L]
        # END WPSuperCache
      </Directory>
    
      # BEGIN supercache
      <Directory "/path/to/wordpress-mu-X.Y.Z/wp-content/cache">
        <IfModule mod_mime.c>
          AddEncoding x-gzip .gz
          AddType text/html .gz
        </IfModule>
        <IfModule mod_deflate.c>
          SetEnvIfNoCase Request_URI \.gz$ no-gzip
        </IfModule>
        <IfModule mod_headers.c>
          Header set Cache-Control 'max-age=300, must-revalidate'
        </IfModule>
        <IfModule mod_expires.c>
          ExpiresActive On
          ExpiresByType text/html A300
        </IfModule>
      </Directory>
      # END supercache
    </VirtualHost>
  2. webmaestro
    Member
    Posted 5 years ago #

    Update: I spent much of yesterday before making the above post, scouring the web and going through any trouble-shooting step I could find. I found this page particularly thorough, but after going through the steps, we still have unreliable caching (we check by using combinations of testing with the Firefox, Safari, Chrome, Chromium (an early version of a Mac OS X Chrome port), Stainless (another early version of a Mac OS X Chrome port), Internet Explorer browsers (both logged in and logged out browsers on Mac & Windows).

    • /wp-content/cache exists, permissions are 777 and umask is 0000
    • /wp-content/cache/supercache exists, permissions are 777 and umask is 0000
    • checked the .htaccess files for correct mod_rewrite rules
    • /wp-content/advanced-cache.php - created via ln -s... and by removing, chmod 777 wp-content & having WP Super Cache create it.

    In addition, we've tried just about every combination of the following settings:

    • WP Super Cache Status - every combination (ON, HALF ON, OFF)
    • Super Cache Compression - Enabled & Disabled
    • Expiry Time - 120 180, 360 seconds
    • Garbage Collection - 1000, 2000, 5000
    • Rejected URIs - with and without wp-*.php & index.php
  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Do the supercache files exist at all?

    Start a browser with no cookies in it at all (clear the cookies). Then load the page. Do new files and directories get created in /cache/supercache?

  4. webmaestro
    Member
    Posted 5 years ago #

    Yes... I'm also placing

    [/path/to/wordpress-mu-X.Y.Z/wp-content]# ls -l
    total 12648
    lrwxrwxrwx   1 USER2   GROUP2         86 Oct  2 15:41 advanced-cache.php -> /path/to/wordpress-mu-X.Y.Z/wp-content/mu-plugins/wp-super-cache/wp-cache-phase1.php
    lrwxrwxrwx   1 USER1   GROUP1          41 Sep 10 10:10 blogs.dir -> /path/to/blogs.dir
    -rw-r--r--   1 USER3   GROUP3        3881 Aug 11 04:17 blogs.php
    drwxrwxrwx   4 USER3   GROUP3     2781184 Oct  3 08:37 cache
    -rw-r--r--   1 USER3   GROUP3          30 May 21  2007 index.php
    drwxr-xr-x   6 USER3   GROUP3        4096 Oct  1 22:10 mu-plugins
    drwxr-xr-x  15 USER3   GROUP3        4096 Oct  2 12:49 plugins
    drwxr-xr-x  11 USER3   GROUP3        4096 Sep 22 08:57 themes
    drwxrwxrwx   4 USER2   GROUP2       4096 Oct  1 16:23 uploads
    -rw-r--r--   1 USER2   GROUP2       2175 Oct  2 17:55 wp-cache-config.php
    [/path/to/wordpress-mu-X.Y.Z/wp-content]# cd wp-content
    [/path/to/wordpress-mu-X.Y.Z/wp-content/cache]# ls |wc
       17973   17973 1358887
    [/path/to/wordpress-mu-X.Y.Z/wp-content/cache]# ls supercache/ |wc
         307     307    9626
    [/path/to/wordpress-mu-X.Y.Z/wp-content/cache]# ls supercache/clay.freedomblogging.com/|wc
           3       3      21
    [path/to/wordpress-mu-X.Y.Z/wp-content]# ls -l cache/supercache/clay.freedomblogging.com/
    total 272
    drwxrwxrwx   3 USER2   GROUP2       4096 Oct  2 16:10 2007
    drwxrwxrwx   6 USER2   GROUP2       4096 Oct  3 06:13 2008
    -rw-rw-r--   1 USER2   GROUP2     124380 Oct  3 00:13 index.html
    [/path/to/wordpress-mu-X.Y.Z/wp-content/cache]# ls supercache/clay.freedomblogging.com/2008/
    06  07  08  09
    [/path/to/wordpress-mu-X.Y.Z/wp-content/cache]# ls supercache/clay.freedomblogging.com/2008/09/
    04  05  11
    [/path/to/wordpress-mu-X.Y.Z/wp-content/cache]# ls supercache/clay.freedomblogging.com/2008/09/11
    9-11-youtube-video-test
    [/path/to/wordpress-mu-X.Y.Z/wp-content/cache]#

    NOTE: USER2 = the httpd process user

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Your rewrite rules are broken and/or in the wrong order.

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    #RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    
    # BEGIN WPSuperCache

    Having those before the supercache rules prevents it from working. I'm also not sure what the heck they're for in the first place. Remove them.

  6. webmaestro
    Member
    Posted 5 years ago #

    Thank you! I think that was it... I believe that was leftover from an earlier install of WordPressMU (1.0? 1.2.1?, 1.3.3?)...

    I now have articles showing the super cache comments:

    <!-- Dynamic Page Served (once) in 2.005 seconds -->
    <!-- super cache gz -->

    It's a bit premature for me to give the 'All clear!' but at least I am seeing more consistency!

    Thank you! Thank you! Thank you!!

  7. webmaestro
    Member
    Posted 5 years ago #

    It looks like, while we've improved the rendering for articles, home pages are no longer being served from CACHE from some blogs, but not others:

    http://lansner.freedomblogging.com/

    http://clay.freedomblogging.com/

    Someone indicated they noticed some issues with caching where swfobject is used. However, in the above cases, clay.fb.com uses swfobject (and *is* being cached), but lansner.fb.com does not use swfobject (and is *not* being cached).

    On a related note, I'm considering moving the wp-content/cache/.htaccess file contents to my httpd virtual conf file, and turning off AllowOverride None. Any thoughts?

  8. webmaestro
    Member
    Posted 5 years ago #

    NOTE: This issue is not yet resolved.

    We were caching the HOME page, but not caching post pages. After making Otto42's changes, post links now serve from the cache (thanks Otto42!), but WPMU no longer serves cached HOME pages. It could be related to a plugin using the Output Buffer, but I don't think that would explain why it works on the POST pages, but not the HOME page.

    I'm about to move the contents of wp-content/cache/.htaccess into my httpd virtual conf file, and set AllowOverride None. I'm pasting the completed file below. Any thoughts on the following settings? Should I move the WP Super Cache up higher?

    <VirtualHost *>
    
      ServerName www.domain.com
      ServerAlias domain.com
      ServerAdmin support@domain.com
      DocumentRoot /path/to/wordpress-mu-X.Y.Z/
    
      LogLevel warn
      ErrorLog /var/apache/logs/wpmu_error_log
      CustomLog /var/apache/logs/wpmu_access_log combined
      RewriteLog "/var/log/apache/rewrite.log"
      RewriteLogLevel 0
    
      <Directory "/path/to/wordpress-mu-X.Y.Z">
        AllowOverride None
        #Order Deny,Allow
        #Allow from all 
    
        RewriteEngine On
    
        FileETag INode MTime Size
        #ExpiresActive On
        #ExpiresDefault "modification plus 30 minutes"
        #<FilesMatch "\\.(html|htm|php|jpg|gif|txt)$">
        #Header set Cache-Control "max-age=1h, only-if-cached"
        #</FilesMatch>  
    
        RewriteBase /
        RewriteRule ^(.*/)?files/$ index.php [L]
        RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    
        RewriteCond %{REQUEST_URI} ^.*/wp-admin$
        RewriteRule ^(.+)$ /$1/ [R=301,L] 
    
        #CL - Commented out to fix issues with WP Super Cache
        #RewriteCond %{REQUEST_FILENAME} -f [OR]
        #RewriteCond %{REQUEST_FILENAME} -d
        #RewriteRule . - [L]
        ##RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
        #RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
        #RewriteRule . index.php [L]
    
        # BEGIN WPSuperCache
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} !.*=.*
        RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
        RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
    
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} !.*=.*
        RewriteCond %{QUERY_STRING} !.*attachment_id=.*
        RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
        RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
        RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.php [L]
        # END WPSuperCache
      </Directory>
    
      # BEGIN supercache
      <Directory "/path/to/wordpress-mu-X.Y.Z/wp-content/cache">
        <IfModule mod_mime.c>
          AddEncoding x-gzip .gz
          AddType text/html .gz
        </IfModule>
        <IfModule mod_deflate.c>
          SetEnvIfNoCase Request_URI \.gz$ no-gzip
        </IfModule>
        <IfModule mod_headers.c>
          Header set Cache-Control 'max-age=300, must-revalidate'
        </IfModule>
        <IfModule mod_expires.c>
          ExpiresActive On
          ExpiresByType text/html A300
        </IfModule>
      </Directory>
      # END supercache
    
    </VirtualHost>
  9. webmaestro
    Member
    Posted 5 years ago #

    BTW, if we go this route, it'd be nice to update WP Super Cache so it doesn't expect (require?) to change .htaccess. ;-)

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Require is correct. It can't be done without .htaccess modifications. That's what makes it capable of "super" caching.

    Honestly, I think you're going way overboard here. Do it in the .htaccess like normal, all these extra rules and weirdness is what is causing all of your issues. If you simply used a normal setup without any extra rules, then it would work fine.

  11. webmaestro
    Member
    Posted 5 years ago #

    There are a couple of reasons I ended up going the httpd virtual conf route. The first reason, was because I was unsuccessful doing it via the .htaccess method, but was able to by inserting the changes via the httpd virtual conf file. In addition, almost everywhere I look, I am advised not to use .htaccess if at all possible:

    In general, you should never use .htaccess files unless you don't have access to the main server configuration file. There is, for example, a prevailing misconception that user authentication should always be done in .htaccess files. This is simply not the case. You can put user authentication configurations in the main server configuration, and this is, in fact, the preferred way to do things.

    .htaccess files should be used in a case where the content providers need to make configuration changes to the server on a per-directory basis, but do not have root access on the server system. In the event that the server administrator is not willing to make frequent configuration changes, it might be desirable to permit individual users to make these changes in .htaccess files for themselves. This is particularly true, for example, in cases where ISPs are hosting multiple user sites on a single machine, and want their users to be able to alter their configuration.

    Since I have access to the main server configuration files, I would like to be able to make it work. Your insight has so far proved invaluable, and is much appreciated!

  12. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Well, it's extremely hard to help you when nobody else does it that way, is my point. WordPress *expects* it to be done in .htaccess files. So if you're going to do it the wrong way, then you're kind of on your own here.

    Also, you've got tons of other rules there, and I can almost guarantee that they are your main problem.

    Basically, you're trying to do too much at one time, and even I can't follow what the heck your site is doing any more. Small steps, please. Get it working the right way before you try to get it working the wrong way.

    Furthermore, if you're using MU, then you're on the wrong forums:
    http://mu.wordpress.org/forums/

  13. webmaestro
    Member
    Posted 5 years ago #

    D'oh! I'd be in the other forums, but this appears to be the official forum for WP Super Cache...

    As for tons of other rules, aside from the LOGGING stuff at the top and the following 'WordPress rules' near the top that I can see is this:

    FileETag INode MTime Size

    WordPress rules near the top:

    RewriteBase /
        RewriteRule ^(.*/)?files/$ index.php [L]
        RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    
        RewriteCond %{REQUEST_URI} ^.*/wp-admin$
        RewriteRule ^(.+)$ /$1/ [R=301,L]

    If those shouldn't be there (or should be moved below the WP Super Cache rules), I'm happy to make the change.

  14. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    These are not "super-cache" forums, these are the generic WordPress self-hosted-blog forums.

    And those are not like any WordPress rules I've ever seen. If they're some kind of special MU rules, then you could discuss them on the MU forums for better support on them.

    And WordPress rules should always come AFTER the super-cache rules. Order is important here.

  15. webmaestro
    Member
    Posted 5 years ago #

    I appreciate your time... I'll see about asking my questions on the MU board. In case you're curious/interested, here's a link to the code in the MU TRAC including the htaccess.dist, that makes up the basis for the WordPressMU .htaccess file.

    I suspect you may be aware, but WP Super Cache is developed & maintained by WordPress developer Donncha (same developer as WordPressMU), and here's where I found the link to this forum for WP Super Cache support (it's at the very bottom of that page).

    Thanks again for your support!

    [OT] BTW, I checked out your recent post about WordPress 2.7 Comments Enhancements and it looks very interesting indeed!

  16. webmaestro
    Member
    Posted 5 years ago #

    Since this thread relates primarily to using WP Super Cache WordPressMU, is has been moved to the WordPressMU Forums: WPMU, WP Super Cache & using virtual conf instead of .htaccess.

  17. webmaestro
    Member
    Posted 5 years ago #

    This has been resolved. I now have WP Super Cache running in WordPressMU via the vhost file (Apache server configuration instead of .htaccess files). The problem was related to missplaced WP Super Cache directives and obsolete Apache Directives.

    Thank you for your help!

  18. cinemaminima
    Member
    Posted 5 years ago #

    I run plain-vanilla WordPress 2.6x and it does not use fancy URIs, so it doesn't use .htaccess files.

    In that case -- where there are no rewrite rules anyway -- what would be a way to install SuperCache without using .htaccess (don't want to make Apache work on those unless absolutely necessary) ?

    Thanks for any comment or help regarding this!

  19. Donncha O Caoimh
    Member
    Posted 5 years ago #

    You can possibly use it in half-on mode, but you won't get the static caching capabilities.

  20. webmaestro
    Member
    Posted 5 years ago #

    You could also do what I've done (of course you should use WordPress-specific configuration instead of the WordPressMU stuff I have), and configure WP Super Cache using the virtual CONF files (the initial purpose of this thread...).

    Following is the end result of my Virtual/vhost httpd CONF file. I'd be grateful for additional tips on improving my httpd CONF file... Here's my permalink: /%year%/%monthnum%/%day%/%postname%/%post_id%/

    <VirtualHost *>
      ServerName www.mydomain.com
      ServerAlias mydomain.com
      ServerAdmin support@mydomain.com
      DocumentRoot /path/to/wordpress-mu-X.Y.Z/
    
      LogLevel warn
      #OLD SCHOOL: Simple Logging
      #ErrorLog /path/to/apache/logs/my_error_log
      #CustomLog /path/to/apache/logs/my_access_log combined
    
      #NEW HOTNESS: Rotate Logs
      ErrorLog "|/path/to/apache/bin/rotatelogs /path/to/apache/logs/my_error_log.%Y%m%d 86400"
      CustomLog "|/path/to/apache/bin/rotatelogs /path/to/apache/logs/my_access_log.%Y%m%d 86400" combined
    
      #RewriteLog /path/to/apache/logs/my_rewrite.log
      #RewriteLogLevel 0
    
      <Directory "/path/to/wordpress-mu-X.Y.Z">
        #DISALLOW/IGNORE .htaccess files
        AllowOverride None
    
        Order Deny,Allow
        Allow from all
    
        FileETag INode MTime Size
        #ExpiresActive On
        #ExpiresDefault "modification plus 30 minutes"
        #<FilesMatch "\\.(html|htm|php|jpg|gif|txt)$">
        #Header set Cache-Control "max-age=1h, only-if-cached"
        #</FilesMatch>  
    
        RewriteEngine On
        RewriteBase /
    
        # BEGIN WPSuperCache
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} !.*=.*
        RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
        RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
    
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} !.*=.*
        RewriteCond %{QUERY_STRING} !.*attachment_id=.*
        RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
        RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
        RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
        # END WPSuperCache
    
        #uploaded files
        RewriteRule ^(.*/)?files/$ index.php [L]
        RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
        RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    
        # add a trailing slash to /wp-admin
        RewriteCond %{REQUEST_URI} ^.*/wp-admin$
        RewriteRule ^(.+)$ $1/ [R=301,L]
    
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule . - [L]
        RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
        RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
        RewriteRule . index.php [L]
    
        #RewriteCond %{REQUEST_FILENAME} !-f
        #RewriteCond %{REQUEST_FILENAME} !-d
        #RewriteRule . /index.php [L]
    
        #<IfModule mod_security.c>
        #       <Files async-upload.php>
        #         SecFilterEngine Off
        #         SecFilterScanPOST Off
        #       </Files>
        #</IfModule>
      </Directory>
    
      # BEGIN supercache
      <Directory "/path/to/wordpress-mu-X.Y.Z/wp-content/cache">
        <IfModule mod_mime.c>
          AddEncoding gzip .gz
          AddType text/html .gz
        </IfModule>
        <IfModule mod_deflate.c>
          SetEnvIfNoCase Request_URI \.gz$ no-gzip
        </IfModule>
        <IfModule mod_headers.c>
          Header set Cache-Control 'max-age=300, must-revalidate'
        </IfModule>
        <IfModule mod_expires.c>
          ExpiresActive On
          ExpiresByType text/html A300
        </IfModule>
      </Directory>
      # END supercache
    
    </VirtualHost>

    IMPORTANT:
    If you're using WordPressMU, you'll want to compare your CONF entries with the trunk/htaccess.dist file for each release.

Topic Closed

This topic has been closed to new replies.

About this Topic