After moving to multisite, nonexistent pages result in infinite mod_rewrite loop
-
Hey folks,
Apologies if this has been asked and answered, but I couldn’t find it in the forums.
We recently moved about 100 blogs from stand-alone sites to a new multisite install.
We’re running on Apache 2.4, and using the subdirectory structure with WordPress MU Domain Mapping 0.5.5.1.
Everything is pretty much going swimmingly, except that we’re getting lots of the infamous “Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.” errors.
But, as I said, everything pretty much seems to be working fine.
After doing as Apache instructed, and turning on LogLevel debug, it appears (though we’re not 100% sure) that what’s happening is external parties have links to items that no longer exist, for whatever reason, and they’re looping in this part of the htaccess rewrite rules:
RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
(we’re using the rules recommended in Network Admin -> Settings -> Network Setup).
We tried to manually doctor .htaccess, adding new rules to stop if this was a top level request:
RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteRule %{REQUEST_FILENAME} ^/(wp-(content|admin|includes).*) RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
That almost worked — it stopped the infinite loops for things that no longer exist. Unfortunately, we have about a dozen sites that are not using domain rewriting, and are just accessed directly from the main site under their directory — and now those 404 entirely on the back end.
Has anyone else experienced this, and, if so, do you have the proper .htaccess incantation to fix it?
Thanks!
- The topic ‘After moving to multisite, nonexistent pages result in infinite mod_rewrite loop’ is closed to new replies.