Hi,
I find in my error-log file from time to time errors like:
mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
After some digging and testing I could reproduce these endless redirection loops and I found that the line
near the end of my standard (by MU created) .htaccess file is related to these loops.
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
-----------------------------
Example:
If I visit a non-existent location on my MU install like http://someblog.site.url/nothingthere (with or without a closing forward slash) I get presented with the standard WP generated 404 page as defined in the theme. (this is on a VHOST setup, but else I would get the wp-signup.php?new=nothingthere page)
If I visit a non-existent location with "wp-" (only lower case) in it like http://someblog.site.url/wp-content/nothingthere (no trailing forward slash) I get presented with a SERVER generated 404 Not Found page ("The requested URL /wp-content/nothingthere was not found on this server.")
If I visit that same location WITH trailing forward slash http://someblog.site.url/wp-content/nothingthere/ I get a 500 Internal Server Error page and an error as above gets added to the error log.
-----------------------------
My questions are these:
- Is this the case for everybody or are there server settings (on my shared host) that trigger this?
- What is that rewrite rule for anyway? If I comment the line out, all seems to work fine (have not tested much though, just browsed a few pages and admin section)...
- Is there a way to prevent the endless redirections in another way (some RewriteCond) if deleting the line is no option?
Thanks for any thoughts on this :)