Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've got a Wordpress MU install in a sub-directory of my webserver. When I point my virtual host at that directory I get my index page but no styling or access to any pages. It's like it can't access anything in the sub-directories of my WP root, I get the 500 error. When I check the Apache log it says,

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

From the research I've done it points to an htaccess problem. However, when I delete the virtual host everything works fine. I'm not sure what else I need to try. I'm using Turnkey Linux. Any suggestions?

Here's my config,

RewriteEngine On
RewriteBase /examples/
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

I think I've narrowed it down to being something with the RewriteBase. Still no solution though.

UPDATE: Getting closer. I tried changing the last RewriteRule to,

RewriteRule ^(.+)$ /index.php/$1 [L,QSA]

Now I'm not getting the 500 error anymore but the CSS for my main site isn't working and some image links. The second site works for the most part except a few broken links and such.

share|improve this question
    
You should probably show your configuration. –  TimWolla Jan 14 '12 at 19:17
    
Thanks, I just added it. –  jerime Jan 14 '12 at 20:06
    
You might want to post your *vhost.conf file as well. Have a suspicion that there may be an issue there as well. –  Stephen Nov 19 '12 at 15:34
add comment

migrated from webmasters.stackexchange.com Jan 14 '12 at 20:48

This question came from our site for pro webmasters.

3 Answers

up vote 1 down vote accepted

You should have a look at this: Request exceeded the limit of 10 internal redirects due to probable configuration error.? and RewriteRule Flags

It seems that you have a recursion in there. It is probably the last rule as the dot without anything else will match index.php as well.

share|improve this answer
    
Thanks. I think that is setting me in the right direction. However, I still have a few issues. I changed the last RewriteRule to, RewriteRule ^(.+)$ /index.php/$1 [L,QSA] No more 500 error but the CSS and a few links don't work (mostly on the main site). The second site almost works completely. A few broken things. ? –  jerime Jan 15 '12 at 1:32
    
You should have a look from with URL the Browser tries to load the resources and with would be the right URL and then fix it. And you should accept the answer that helped you most by ticking the Checkbox below the score and upvoting other helpful answers. –  TimWolla Jan 15 '12 at 11:54
    
The URLs are right...sort of. By that I mean when I check links it gives me the full path. Instead of getting www.home.com/link1 I get www.home.com/examples/link1. "/examples/" being the root of my install. Is there anything in the database that might need to be changed or is this all the htaccess file? –  jerime Jan 15 '12 at 17:50
    
I know that wordpress has an setting for the folder. But I don't know whether this is responsible here. –  TimWolla Jan 15 '12 at 18:42
    
Yes, I just checked that and you're right. Any other suggestions? –  jerime Jan 15 '12 at 20:52
show 1 more comment

I tracked down this issue in my WordPress multisite install. The redirect limits were being triggered by default Word Press rewrite rules.

Original (faulty) rules

RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]

The problem occurred with requests to non-existant files in the wp-content, wp-admin, or wp-includes folders. Instead of triggering the normal 404 response, the first part of the rule matched the url whether it was a subsite link or not and thus looped infinitely.

Fixed rules

RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]

A look at the latest Word Press source code shows this to have been corrected. It only affects older multisite installs. The RewriteRules have to be manually updated.

share|improve this answer
add comment

I can tell you that in wamp (havent seen your sever type) you need to do the following
in order to activate "mod_rewrite" so the system can work with permalinks..

1. click the icon of wamp on your bottom left (running programs)
2. Choose >> apache >> apache modules
3. here if you scroll trough the option you would find a mod_rewrite
4. activate it, restart your server and you should be ok

Hope this helps.
Cheers, Sagive

share|improve this answer
    
I'm using Turnkey Linux which is a Ubuntu base. I'm pretty sure mod_rewrite is on. I'm checking from Webmin and it displays rewrite is enabled. Unless there is something special I need to do for virtual hosts as well. –  jerime Jan 15 '12 at 17:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.