• WordPress Version 2.7
    WP Super Cache version 0.9.1

    I am using Firefox and I am not logged in. (I am looking at things logged in under Internet Explorer and FTP)

    Static pages are being created. I can see them in the wp-content/cache/supercache directory. But the plugin Cache Contents page shows perhaps half of the static pages that exist.

    For posts and the home page, clicking reload creates a new static page rather than serving up the old one (the timestamp is updated in “View Source” and the creation date is updated in FTP).

    For pages, on reload the timestamp doesn’t change, but the expected additional comment line doesn’t appear. (So this means it’s coming out of WP-cache?)

    I know that this is expected behavior if a comment is added to a post, but this happens on posts that haven’t changed.

    Has anyone seen behavior like this before?

    I’ve looked at and tried the debugging steps mentioned in the plugin. What else should I be looking at? What additional information would be useful?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve seen this happen on hosts where the DOCUMENT_ROOT seen in PHP is completely different to that seen by Apache’s mod_rewrite rules.

    You could try editing the rewrite rules, but I tried that too and it didn’t help.

    Change to half-on mode and it should work fine though.

    Thread Starter rayfusci

    (@rayfusci)

    Thanks for your reply!

    I’ve left it in half-on mode while I’ve been chasing this, and that appears to be working fine.

    Yes, I determined last night that there’s indeed something funny in the rewrite rules, but it’s not DOCUMENT_ROOT. In this case, the path is fine from DOCUMENT_ROOT on down until I get to the “1$” term. If I replace “1$” with what it ‘ought’ to be translated to, it passes that rule just fine.

    Tonight’s challenge is to find a way of getting it to tell me what mod_rewrite thinks 1$ is at that point. I’m on a shared-hosting system, so I don’t have access to much.

    phpinfo() reports that the Apache version is 1.3.33. Has anyone heard of any strange mod_rewrite bugs in that version?

    Thread Starter rayfusci

    (@rayfusci)

    After beating my head against mod_rewrite, I messed with .htaccess and it’s actually serving pages.

    I’m not using compression, so I just changed two lines. Similar changes should work for the compression ruleset.

    First line changed:
    generated line was:
    RewriteCond %{DOCUMENT_ROOT}/oib/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1/index.html -f

    I removed a / from it:
    %{DOCUMENT_ROOT}/oib/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1index.html -f

    I’m not sure if that was really necessary. My permalinks are of the form /%postname%/, which means $1 has a trailing slash. Two consecutive slashes looked funny to me.

    Second line changed:
    Generated line was:
    RewriteRule ^(.*) /oib/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1/index.html [L]

    I closed the pattern, removed the first directory term and removed that same slash:
    RewriteRule ^(.*)$ /wordpress/wp-content/cache/supercache/%{HTTP_HOST}/wordpress/$1index.html [L]

    Again, I’m not sure closing the pattern or removing the slash were strictly required.

    I have one hosting account. The home page of the primary domain associated with that hosting account is in DOCUMENT_ROOT. I have another domain whose homepage resides in the DOCUMENT_ROOT/oib directory. That second domain is the one that has WordPress installed in the DOCUMENT_ROOT/oib/wordpress directory.

    Maybe someone smarter than me can explain what’s going on. I just hope it continues to work.

    donncha, if you come up with any mods you want to make in your code for this case, I’d be happy to test them.

    I ran into the same issue. Ray’s fix did the trick here as well.
    (Plus adding the parent folder before /wp-content/ I didn’t catch that one before)

    Thanks Ray for digging into this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP Super Cache] Creating but not serving static files’ is closed to new replies.