• I just upgraded to supercache v0.8 and updated my htaccess file to match the rewrite rules specified on the supercache settings page:

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1/index.html.gz -f
    RewriteRule ^(.*) /wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1/index.html.gz [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{DOCUMENT_ROOT}/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1/index.html -f
    RewriteRule ^(.*) /wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1/index.html [L]
    </IfModule>
    # END WPSuperCache

    All dynamic pages are sent as garbage to the client. If I revert to the previous rules it doesn’t happen:

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*p=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1/index.html.gz -f
    RewriteRule ^(.*) /wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1/index.html.gz [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*p=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{DOCUMENT_ROOT}/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1/index.html -f
    RewriteRule ^(.*) /wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1/index.html [L]
    </IfModule>
    # END WPSuperCache
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Those rules are basically identical, they would not change anything. All that was added there was to not send super cached files for default permalinks.

    Try turning off the gzip compression option in the super cache config screen. That sometimes results in “garbage” on some servers, but in an unpredictable fashion. Usually happens on IE browsers. Also clear the cache when you turn off gzip. And use the new rules.

    Thread Starter ghosttie

    (@ghosttie)

    That’s very strange – I turned compression off and it was fine, then I turned compression back on and it was still fine…

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Compression is not one of those things where it breaks every time. Sometimes it works, sometimes it does not.

    If it shows garbage at all, ever, then turn compression off and leave it off.

    Thread Starter ghosttie

    (@ghosttie)

    ok. that’s a shame though

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP Super Cache] new htaccess rules result in garbage sent to client’ is closed to new replies.