Found a rewrite loop issue for subfolder installs – my explanation on the ticket. Basically if a file under wp-content is requested and not found, Apache goes into a rewrite loop.

Anyone with MU or a 3.0 network can fix their .htaccess files.

Existing rewrite rule you may have in 3.0:

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

Or if you upgraded from MU it looks like this:
RewriteRule (^[_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule (^[_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]

Fixed version:

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

Just do a straight up replace of those lines.

If you have a subdomain install, you do not need to do this. If you have these rules, you can actually remove them.


  1. Interesting. I have :

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

    Will this cover that as well or should I leave the first line alone?

  2. Hey Andrea,

    Found myself here after trying to change themes to individual site…(you’ll find that I just left a comment on another post)….

    Attempted the fix, but nothing happened…

    I have 13 different sites that I tried to set up, but when I visit my dashboard under “My Sites” only the main blog shows up….what’s the deal with that…

    Am I missing something?

    Hope you can help me….


  3. I have setup subfolder redirect on dreamhost with mirrored domains.

    When I go to without the domain set as primary in the domains settings, then it loads correctly.
    If I go to it will load

    BUT once I select the primary domain button, they point to each other and get caught in a loop. I have looked at my .htaccess file and everything looks good there.

    If I load it tries to load and then gets caught in the loop.
    If I load, it gets caught in a loop.

    I have read tutorials and suggestions all afternoon. Any suggestions would be VERY appreciated.


  4. they point to each other and get caught in a loop

    That’s exactly your problem. Remove the subfolder redirect in your hosting account then they won’t point at each other..

  5. Ron,
    Thanks for the feedback. I actually have pointing (mirrored) to Then domain mapper makes it point to the right directory.

    Right now I have “primary” off, so it is just a simple redirect. If I turn “primary” on, then I get stuck in the loop.

    Is this what you were referring to? Or is there something else I am missing?

  6. So I have my domain pointed to the domain where the wp install is. In this case

    The only thing I can figure out is that it may have something to do with dreamhost not allowing the wildcard in the DNS settings.

    I have set as “mirrored” to without specifying a directory.

    As it is, there is basically a redirect setup. When I active the “primary” button on the domain mapping, then I get the loop.

    Thanks for your help.

    • you can map domains without the wildcard subdomain. that part is unrelated.

      ” have set as “mirrored” to without specifying a directory.”

      and that’s why it doen;t work. gotta tell it where to go.

      I covered this in my domain mapping ebook.

  7. I just tested another configuration.

    IF I have EITHER “primary” unchecked OR no value in the IP number field under domain settings THEN works as a redirect.

    If primary is checked AND the IP address is filled in THEN we get caught in the loop.

    Thanks, James

    • The IP address is only there for user reference (ie. if you had users like who were mapping their own domains).

      The domain mapping plugin doesn’t use the IP address for anything.

      You’ll have to talk to dreamhost support about your configuration. What you are looking for is a server alias.