WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP Super Cache] Supercache appended to URL (9 posts)

  1. pearljones
    Member
    Posted 5 years ago #

    I have supercache installed on my blog. I can tell it is working because I can view source and see
    <!-- Dynamic Page Served (once) in 0.482 seconds -->
    <!-- Cached page generated by WP-Super-Cache on 2009-03-27 17:33:04 -->
    <!-- Compression = gzip -->
    at the end.
    My problem is supercache is appending itself to the end of the URL in the navigation bar. So instead of http://mysite.com/blog I get http://mysite.com/blog/wp-content/cache/supercache/mysite.com/blog/index.html.gz. How do I correct this? Thanks for your help. Sorry if this is a double post.

  2. pearljones
    Member
    Posted 5 years ago #

    Does anybody else have this problem? This seems to happen when I refresh a page or revisit. It seems to me that the permalink should be displayed all the time. Will this affect me in google or feeds or anyone who bookmarks my site? Does anyone know what I should check?
    Thanks for your help

  3. pearljones
    Member
    Posted 5 years ago #

    In case anyone would like to check it out to see if there is indeed a problem, the address is http://pearljones.com/blog. I got supercache appended to the URL in one computer but not in another so I don't know what to make of that. This is my first blog I set up so I just want to make sure it is working OK. Thanks.

  4. Donncha O Caoimh
    Member
    Posted 5 years ago #

    pearljones - have you changed the mod_rewrite rules in the .htaccess? I presume it's doing an external redirect instead of internal..

    You could also switch to "half on" mode to avoid this problem.

  5. pearljones
    Member
    Posted 5 years ago #

    Thank you for getting back to me donncha. When I installed Supercache I made /blog and the .htaccess file writable and supercache added to it. Here is my .htaccess in /blog.

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

    # END WPSuperCache

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    # END WordPress

    And here is my .htaccess in /blog/wp-content/cache/:

    # BEGIN supercache
    <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>

    # END supercache

    I just let supercach create this. Can you see something wrong with it?

    Thanks for your help!

  6. pearljones
    Member
    Posted 5 years ago #

    I think I forgot to mention that I don't know that much about .htaccess (probably just enough to screw it up) so if you could take a look at my current .htaccess that was generated by supercache and point me in the right direction that would be great. I know you mentioned

    I presume it's doing an external redirect instead of internal
    but you lost me there. Sorry.

  7. pearljones
    Member
    Posted 5 years ago #

    Also, I did have this working correctly when I first setup WordPress with Supercache and permalinks. Just recently I noticed this. I did get a notification in my Dashboard the other day to upgrade to WordPress 2.7.1, which I did. I don't know if that had anything to do with it.

  8. pearljones
    Member
    Posted 5 years ago #

    OK, this morning I set Supercache to Half-On and the links are appearing as they should in the address bar. But why can't I use the full Supercache? Is this a bug or something? If not, what can I do to enable the full Supercache and have it work properly?
    Thanks.

  9. Donncha O Caoimh
    Member
    Posted 5 years ago #

    pearljones - I have no idea why you're seeing what you're seeing. It might be a plugin, or a configuration issue in your blog but the rules above look ok.

    Try disabling your plugins one-by-one and testing in full mode.

Topic Closed

This topic has been closed to new replies.

About this Topic