WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache (7 posts)

  1. microguy
    Member
    Posted 5 years ago #

    I can see the static files in the supercache directory but they are not being served to the client. Regardless of which computer, which browser, logged in, logged out, the page source reads:

    <!-- Cached page served by WP-Cache -->
    <!-- Compression = gzip -->

    I have tried hardcoding the .htaccess file but still no success in getting the static files to the client.

    Website URL is http://www.microguy.net.
    Plugin status: Active

    Here is my .htaccess file:

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    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}/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} !.*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}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    </IfModule>
    # END WPSuperCache

    I'm using Godaddy hosting and a virtual domain located in a subdirectory of my main account.

    /wwwroot/microguy.net/htdocs/wp-content/cache/supercache/www.microguy.net/

    .htaccess file is located in root /htdocs/

    I've been working on this for 4 hours. Hypercache works perfectly when installed. Please help anyone. Thanks.

  2. microguy
    Member
    Posted 5 years ago #

    Update: The .htaccess file just changed again from this:

    # Why does this file keep changing?

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    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}/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} !.*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}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    </IfModule>
    # END WPSuperCache

    # BEGIN WordPress
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    To this:

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    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}/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} !.*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}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    </IfModule>
    # END WPSuperCache

    # BEGIN WordPress

    # END WordPress

  3. microguy
    Member
    Posted 5 years ago #

    Update:

    I just installed a fresh version of Firefox on a colocated machine and the super cache in not working. At the bottom of each page is:

    <!-- Dynamic Page Served (once) in 1.011 seconds -->
    <!-- Cached page served by WP-Cache -->
    <!-- Compression = gzip -->

    Has anyone had this issue? Also, I was thinking about making /htdocs/ read only so the .htaccess file will stop being automatically updated. The plugin keeps updating the .htaccess file for some very strange reason.

  4. microguy
    Member
    Posted 5 years ago #

    I've been searching Google and this seems to be a known issue with WP Super Cache. I will be removing the plugin until a fix is available.

  5. Donncha O Caoimh
    Member
    Posted 5 years ago #

    microguy - the plugin won't update the .htaccess unless you tell it to. It could be another plugin that's messing up your .htaccess. Look for "insert_with_markers" in your plugins. Could be one of those.

    Or there's something very strange with your version of WordPress..

  6. microguy
    Member
    Posted 5 years ago #

    Problem solved. I was using the default permalink structure in WordPress.

  7. Ripose
    Member
    Posted 5 years ago #

    Did you do Step 8? You have to if you have any static pages.

    After you have enabled the plugin, look for the file "wp-content/cache/.htaccess". If it's not there you must create it. It should read:

    AddEncoding x-gzip .gz
    AddType text/html .gz

    The beasts & the children are free!

Topic Closed

This topic has been closed to new replies.

About this Topic