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.
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?
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.