WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
Map subdomain to subdomain (4 posts)

  1. Ned Zimmerman
    Member
    Posted 5 months ago #

    I am working with a WordPress network, network.com (configured to use subdomains) and I am trying to do the following:

    I want to map http://blog.mysite.com to http://mysite.network.com, where http://mysite.com is an external site that I control and http://mysite.network.com is my site on the network.

    I've done what I think I'm supposed to do for this—that is to say, added a CNAME record for mysite.com that points blog.mysite.com to mysite.network.com, but instead of loading the specific site on the network to which I've mapped it, http://blog.mysite.com sends me to the root site on the network. Any ideas? DNS records are as follows.

    mysite.com

    Host		Records		Details
    
    @			A			11.22.33.44
    *			A			11.22.33.44
    blog		CNAME		mysite.network.com

    network.com

    Host		Records		Details
    
    @			A			55.66.77.88
    *			A			55.66.77.88
    www			CNAME		network.com

    And .htaccess for network.com is as follows.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    # always redirect non-logged-in users on the main site to wp-signup.php
    RewriteRule ^wp-(signup|activate)\.php /wp-content/themes/network-root/.core/wp-$1.php [L,QSA]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    
    ### BEGIN ANTISPAMBLOG REGISTRATION
    # RewriteCond %{REQUEST_METHOD} POST
    # RewriteCond %{REQUEST_URI} .wp-signup.php*
    # RewriteCond %{HTTP_REFERER} !.network.com. [OR]
    # RewriteCond %{HTTP_USER_AGENT} ^$
    # RewriteRule (.*) http://network.com/spam-prevention/ [R=301,L]
    ### END ANTISPAMBLOG REGISTRATION
    
    # Disable directory browsing:
    Options -Indexes

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

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 5 months ago #

    You need to park (cPanel) the mapped doman in your web host account control panel. If you don't have cPanel them look for either park or domain aliases in your control panel.

  3. Ned Zimmerman
    Member
    Posted 5 months ago #

    Just to clarify, I need to park blog.mysite.com?

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 5 months ago #

    Yes.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.