Support » Plugin: WordPress MU Domain Mapping » [Plugin: WordPress MU Domain Mapping] Redirect loop on backend home page

  • Resolved rmose


    Current Setup
    WordPress 3.3.1, network/multisite with subdirectories
    WordPress MU Domain Mapping
    No boxes are checked under “Domain Mapping”.
    No domains are currently mapped.

    When network activating the plugin, the message below is displayed at the top of the page. Is there any way to see the additional output?

    “The plugin generated 167 characters of unexpected output during activation…”

    Before mapping any domains, I visited the main website to confirm that everything still worked. That resulted in a looping redirect with the browser giving up. The log file contains lines like the following.
    and so on, ever increasing in length

    Going to another site, such as the following, works without issue.

    Going to works fine, as well. I can login as the administrator, and I’m placed in It appears that the looping only occurs when visiting the main site home page http(s)://

    There are no SEO plugins installed. In fact, there are relatively few plugins installed. It looks like WP is attempting to redirect the main site to internally, as it normally does on a multisite with subdirectories, but something is interfering with that process and causing a loop. I believe everything is correctly configured as described in the installation notes and suggested web page.

    Is this a known issue? If yes, is there a way to correct it? If not, can someone describe in a little more detail what you believe is happening internally? That might give me some clues about what to do next. Thanks for your insight.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Ron Rennick


    The plugin generated <some number> characters of unexpected output during activation…

    That message is usually a result of a plugin being corrupted during installation.

    Remove the domain mapping plugin and sort out the issue with the redirects before re-installing any plugins.

    My original message might not have been clear. At this time, the domain mapping plugin appears to be the source of the redirect looping. The problem occurs when the plugin is activated and goes away when the plugin is deactivated.

    So, sorting out the issue of the redirects means installing and activating the domain mapping plugin and then doing some debugging. That was in the plan all along. One reason for this post is to glean details about the inner workings of the plugin to hopefully shorten the time it takes to debug this issue. Any pointers would be appreciated.

    The unexpected output during activation is not the result of corruption. The message is below. It is attempting to check if the current version of WP is 2.9.2.

    Notice: Undefined variable: wp_version in ~/wp-content/plugins/wordpress-mu-domain-mapping/domain_mapping.php on line 683

    Plugin Author Ron Rennick


    Check to see if it’s $wp_version or wp_version. The code that should be in the zip is $wp_version.

    $wp_version is a global variable.

    Line 683 is the same as the link you provided. The code has not been modified since installation.

    if ( $wp_version == ‘2.9.2’ ) {

    Plugin Author Ron Rennick


    You can probably eliminate that activation error by adding a

    global $wp_version;

    after the */ at the the of the copyright notice. It’s been a couple years since the last time, but I have seen a couple servers that blocked access to global variables without having an explicit global declaration for them.

    For the rewrite issue, what are the permalinks set to on the main site?

    Explicitly adding “global $wp_version;” at the top eliminated the message about extra characters being generated after activation.

    Permalinks are set to use day and name. The blog page is named Blog. The sample permalink is

    A static page is selected as the home page, and the Blog page is currently set to private. The permalink for the home page is

    Plugin Author Ron Rennick


    The permalink for the home page is

    That’s your issue – Domain mapping only works with WP installed in the root of the website.

    The installation instructions clearly state that giving WordPress its own directory does not work with multisite enabled. See the following link.

    The blog slug is automatically used by WordPress for the main site in a multisite install using subdirectories to prevent collisions. The blog slug is clearly mentioned below.

    Plugin Author Ron Rennick


    The blog slug is not used for the home page of the site. It is added to the beginning of the permalinks to your categories, tags & posts.

    You can create a network when WP is installed in a folder. What you can’t do is create a network when the install in a folder and have made the changes so that the site appears in the root of the website.

    IF WP is installed in the root of your website, how did you get the home page to be /blog?

    IF WP is installed in the root of your website, how did you get the home page to be /blog?

    That’s an interesting question. There is no blog directory on the server and never was. WordPress was at the root of the website from the start. It seems like something went wrong during installation that caused the main site to be named “blog”. I didn’t think that was possible for multisite.

    I’ll blow away the database and do a reinstall. If the blog slug is causing the looping, then a reinstall should take care of it. I’ll post the results.

    I am happy to report that after deleting the database and installing a fresh copy of 3.3.1, the domain mapping plugin is working perfectly in multisite mode. It is still a mystery how “blog” became part of the main site URL. Thanks, Ron, for pointing that out, because that was the issue.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: WordPress MU Domain Mapping] Redirect loop on backend home page’ is closed to new replies.