WordPress.org

Ready to get started?Download WordPress

Forums

.gz compression only @ homepage (WP-Super-Cache 0.6) (6 posts)

  1. funimal
    Member
    Posted 6 years ago #

    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

  2. funimal
    Member
    Posted 6 years ago #

    any idea, to fix the problem?

  3. Donncha O Caoimh
    Member
    Posted 6 years ago #

    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?

  4. funimal
    Member
    Posted 6 years ago #

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

  5. richardxthripp
    Member
    Posted 6 years ago #

    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.

  6. richardxthripp
    Member
    Posted 6 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic