WordPress MU Domain Mapping
WordPress MU Domain Mapping WP3.0, subdirectory, shared hosting not working (6 posts)

  1. anndonnelly
    Posted 5 years ago #

    I've read through a few posts here and on various blogs and have been on the phone with my host for a couple hours, so not sure if I am trying something impossible, or if I'm coming at it from the wrong angle.

    blog1 = oldsite.com
    blog2 - oldsite.com/newsite -> I want to be reached from newsite.com

    I've installed the Domain Mapping plugin, I've added the ip address to the Domain Mapping Page. I've indicated the domain (with and without www) under Domains for Blog 2.

    Per advice of hosting company, I have newsite.com on the same hosting account as oldsite.com pointing to the root directory. When I navigate to newsite.com it is redirecting to oldsite.com.

    My host thought that there are too many redirects, so newsite.com is getting to oldsite.com but not on to oldsite.com/newsite.

    I said that I had read on some forums/posts that you needed to set up parking for that domain, but he said it wouldn't work the server wouldn't know where to go. I was going to try it myself, but it's not one of the options I can set up from my control panel :-p If I am advised here that I do indeed need to remove from oldsite.com hosting and set up as parking, I will get them to do that for me.

    When I remove the hosting completely from newsite.com I only get a holding page indicating that the server doesn't know what to do with the domain -- even with A record set up to point to the ip address of oldsite.com

    There are only two sites in this 'network' but run by the same client, so if needed I'll move the second site to a separate install. Just thought it'd be easier for him to use the one panel and could add more sites in future if he wanted.

    Thanks, Ann


  2. Donncha O Caoimh
    Plugin Author

    Posted 5 years ago #

    So you have a folder based install of WordPress 3.0 running in multisite mode at / ? And /newsite/ is just another blog on that install? It should work fine.

    You should probably add some mail() commands to wp-content/sunrise.php or wp-content/mu-plugins/domain_mapping.php to try and figure out why it's redirecting. That's what I'd do to trace the execution of the code.

  3. anndonnelly
    Posted 5 years ago #

    Thanks Donncha, sorry I wish I knew php, but don't, can I have an example of what commands to insert? I'm searching for something online about it, but nothing specific found so far.

    I removed the following from sunrise.php thinking that may remove one direct:
    if( ( $nowww = preg_replace( '|^www\.|', '', $dm_domain ) ) != $dm_domain )
    $where = $wpdb->prepare( 'domain IN (%s,%s)', $dm_domain, $nowww );
    $where = $wpdb->prepare( 'domain = %s', $dm_domain );

    Also removed redirects from .htaccess that I had in from old URLS when the site was redeveloped from static to WordPress.

  4. anndonnelly
    Posted 5 years ago #

    I will become a coder yet! I've added at the top of sunrise.php:
    //sending mail for debugging
    // The message
    $message = "email sent from start of sunrise.php";
    // Send
    mail('myemail@gmail.com', 'Sunrise Debugging', $message);

    and another at the start and end of domain_mapping.php with a specific message for that.

    Received both messages from domain_mapping.php but not sunrise.php. Could this be my problem? Something to do with sunrise.php? I have this at the end of wp-config.php:
    define( 'SUNRISE', 'on' );

    Will go back through the set-up.

  5. I have this at the end of wp-config.php:
    define( 'SUNRISE', 'on' );

    Don;t put it right at the end. :) If it is below the line that says "That's all!" then you've found the problem. ;) Needs to be higher in the file than that. Below that line it won't be read.

  6. anndonnelly
    Posted 5 years ago #

    I moved that code up and it appears to be working now!! Thanks Andrea! (thought maybe you'd be offline today with your visitors)

    So mod_rewrite wasn't the issue here, but...

    Just before this I deactivated all the plugins per a thread I found from about a year ago where someone was getting same mod_rewrite errors and the mod_rewrite errors stopped per the error log - so now I have something else to play around with.

    Thanks Andrea and Donncha! Glad I don't have to give up on MU (aka MultiSite) yet!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress MU Domain Mapping
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic