• Resolved j w

    (@justinmwoodum)


    Hey all. I am wondering what I need to do to mask the domain of a multi-site like this:

    maindomain.com/subdomain/page –> subdomain.com/page

    I have pointed the “www” A record for the subdomain at the IP of the server the multi-site is stored on. I believe I’ve setup the plugin correctly. I mapped “subdomain.com” to the subsite via Settings: Domains. I added “subdomain.com” as a Parked Domain via my host account’s CPanel.

    When I navigate to…

    subdomain.com/page

    I am redirected to…

    maindomain.com/subdomain/page

    The maindomain is not masked like I am seeking. What else do I need to here? Thanks.

    http://wordpress.org/plugins/wordpress-mu-domain-mapping/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter j w

    (@justinmwoodum)

    Very strange. New observations…

    • If I disable the plugin, but leave sunrise.php in wp-content, the URL “subdomain.com/page” works.
    • If I activate the plugin and leave sunrise.php in wp-content, it redirects to “maindomain.com/subdomain/page”.
    • Disabling sunrise.php via wp-config.php seems to have no effect either way, whether the plugin is activated or disabled.
    • If I rename sunrise.php to in-effect disable it, the entire site breaks (just says “error”). Doesn’t matter whether plugin is activates/disabled; doesn’t matter if sunrise.php is enabled/disabled via wpconfig.php.
    Plugin Author Ron Rennick

    (@wpmuguru)

    Set you mapped domain to be the primary domain.

    Thread Starter j w

    (@justinmwoodum)

    Finding clues on the web…

    “Check out wp-includes/ms-settings.php. Sunrise gets included early. If
    $current_site and $current_blog are set by sunrise, then nearly all of the
    logic in that file gets skipped.

    In there, you’ll find a lot of logic to determine exactly which network and blog you’re trying to reach. The purpose of sunrise is to optionally
    override all of that. Domain mapping is one such use case, for sure.” (source)

    Thread Starter j w

    (@justinmwoodum)

    Somehow didn’t see your response before posting above, Ron. Will try.

    Thread Starter j w

    (@justinmwoodum)

    Set “maindomain.com” as Primary via Domains settings. Now when I navigate to “subdomain.com/”, it redirects to “maindomain.com”. When I navigate to “subdomain.com/page”, it redirects to “maindomain.com/page” (subdomain folder is left out). Closer, but still not solved.

    Thread Starter j w

    (@justinmwoodum)

    I misunderstood. Resolution was to check the Primary setting for “subdomain.com”. It seems to work perfectly…which is awesome!

    FYI, basically, I misunderstood the Primary feature. To me, “Primary” means “most important” or “first looked at”. I assumed because of this, there could be only one Primary, and it should be the domain associated with the root of the multisite (in my example, “maindomain.com”). It turns out though, that multiple domains listed on the Domains page can be set as Primary. Setting a domain as primary will create this “masked” effect like I was seeking at the start of this thread (though, technically, masking a domain is different).

    my site is hosted on Hostgator in a subdirectory (e.g.http://flychinaeastern.net.vn/). I want to mask the site by the domain that I’ve bought from GoDaddy

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Masking domain of multisite’ is closed to new replies.