I loaded your /index.php and it didn’t appear to be cached. If the file doesn’t include any WordPress files I can’t see how it could be cached.
Hi donncha, I actually deactivated the plugin because I didn’t undertand why it was acting this way. If I activate the plugin write now, I see the following at the bottom of ‘/credit-cards.php’ (sorry, not index.php, because it redirects).
<!-- Dynamic page generated in 0.524 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-10-15 10:14:46 -->
I also see ‘/credit-cards.php’ in the list of cached files in the Dashboard.
The same happens to all pages of my site, not just those within /blog/. Some pages do have references to the WP loop, but this page certainly does not, so it’s a clean example.
It doesn’t *appear* to affect the functionality of the site, but I can’t risk that the caching may have adverse affects for other users.
Any idea why this might be happening? And any idea if I can use the “exclude string” setting to exclude all files in my site, and then “re-include” only those within /blog/?
For the record, this is what “view mod_rewrite rules” is showing me:
# 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_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
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_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
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
Rules must be added to /home/froker/public_html/blog/wp-content/cache/.htaccess too:
# BEGIN supercache
<IfModule mod_mime.c>
<FilesMatch "\.html\.gz$">
ForceType text/html
FileETag None
</FilesMatch>
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 Vary "Accept-Encoding, Cookie"
Header set Cache-Control 'max-age=300, must-revalidate'
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html A300
</IfModule>
# END supercache
I understand that this isn’t *supposed* to be happening, but the fact is, it is. Maybe there’s something weird about the way my site is set up, but it’s happening.
All I really want to be able to do is explicitly tell WP Super Cache which files to include or not to include. Since all the files outside of my blog have very different filenames, I can’t rely on the normal exclude functionality that’s built on string matches.
If instead I could say exclude any file that DOES NOT MATCH ‘*/blog/*’, my problem would be solved. Is that possible?
So, your php files are loading the WordPress configuration? You could define the constant DONOTCACHEPAGE in pages that shouldn’t be cached.
If every page loads WordPress, edit your wp-config.php and have it check the REQUEST_URI for /blog/. Set that constant if it’s not there.
sounds like you mean do something like this:
[in wp-config.php]
if(strpos($_SERVER['REQUEST_URI'],'/blog')) define('DONOTCACHEPAGE',true);
is that sufficient? i haven’t done much editing of wp-config before, so i want to be sure. and does it make more sense to add this to wp-config.php or wp-cache-config.php?
thanks for your help!
Do the opposite, “!strpos(…..” or it your blog won’t be cached! 🙂
ah yes, haha. typo! this is why i will never work at google.
i’ll give that a shot, thanks!