Support » Plugins » .gz compression only @ homepage (WP-Super-Cache 0.6)

  • Hello,
    i’ve installed Super-Cache 0.6 @ WP 2.3.3
    My problem is, that the browser only gets the .gz compression at the homepage (http://funimal.de); all other pages are uncompressed (e.g. http://funimal.de/tag/clipmix). But these compressed pages exists in the supercache-folder.
    This is my complete .htaccess:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{HTTP_COOKIE} !^.*comment_author_.*$
    RewriteCond %{HTTP_COOKIE} !^.*wordpressuser.*$
    RewriteCond %{HTTP_COOKIE} !^.*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 %{QUERY_STRING} !.*s=.*
    RewriteCond %{HTTP_COOKIE} !^.*comment_author_.*$
    RewriteCond %{HTTP_COOKIE} !^.*wordpressuser.*$
    RewriteCond %{HTTP_COOKIE} !^.*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]
    
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !http://funimal.de
    RewriteCond %{HTTP_REFERER} !http://funimal.net
    RewriteCond %{HTTP_REFERER} !http://funimal.com
    RewriteCond %{HTTP_REFERER} !http://blog.funimal.de
    RewriteRule (wp-content/uploads.*\.(gif|jpg|jpeg|png)$)|(lustige-tiere-bilder.*\.(gif|jpg|jpeg|png)$) http://funimal.de/wp-content/themes/design/hotlink.jpg [L]
    RewriteRule ^wp-comments-post-(.*).php$ wp-comments-post.php?cpr_code=$1 [L]
    </IfModule>

    Regards,
    Dennis

Viewing 5 replies - 1 through 5 (of 5 total)
  • any idea, to fix the problem?

    Try removing the last slash from the last two lines of each block of rewrite rules so the end looks like “$1index.html.gz” instead of “$1/index.html.gz” Does that help?

    yes, i’ve changed this, but it doesn’t work. Any other idea?
    Regards

    The plugin was only gzipping the home page for me too, but it’s working now that I hand-coded some of the values. I changed these two groups of two lines:

    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 %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]

    To this:

    RewriteCond /wp-content/cache/supercache/richardxthripp.richardxthripp.com/$1/index.html.gz -f
    RewriteRule /wp-content/cache/supercache/richardxthripp.richardxthripp.com/$1/index.html.gz [L]
    
    RewriteCond /wp-content/cache/supercache/richardxthripp.richardxthripp.com/$1/index.html -f
    RewriteRule /wp-content/cache/supercache/richardxthripp.richardxthripp.com/$1/index.html [L]

    You can put your web address in there (check the supercache folder), and prepend to /wp-content if your blog is in a subdirectory. I think some hosts don’t work with %{DOCUMENT_ROOT} (I have Netfirms), which may be the source of the problem.

    I’ve found this tool good for confirming gzip, if you don’t trust the footer in the source code alone. Here’s the analysis of a subpage from my website, for example.

    Good luck getting it to work on your site.

    Here’s the subpage analysis; I mixed up the URIs above.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘.gz compression only @ homepage (WP-Super-Cache 0.6)’ is closed to new replies.