• Resolved JohnM

    (@jmanko)


    I’m looking for both a CNAME and Domain Mapping example. My configuration is not mapping my domain, instead it’s doing a permanent redirect.

    My configuration is as follows:

    For mydomain.com CNAME record:

    Host Name = *
    Address = otherdomain.com

    My DM for mydomain.com:

    Site ID = 2 (site1.otherdomain.com)
    Domain = mydomain.com
    Primary = NO

    My DM Options:

    Server CNAME domain [otherdomain.com]
    [X] Remote Login
    [ ] Permanent redirect (better for your blogger's pagerank)
    [X] User domain mapping page
    [X] Redirect administration pages to site's original domain (remote login disabled if this redirect is disabled)
    [ ] Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.

    My .htaccess:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # 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]
    # END WordPress

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

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

    (@wpmuguru)

    Your WP configuration doesn’t have any affect on whether you use an A record or a CNAME. Either method is just the means by which the request gets directed to your web server.

    Thread Starter JohnM

    (@jmanko)

    Ok. So, does the DM config look ok?

    Thread Starter JohnM

    (@jmanko)

    The wordpress options table does not contain any “dm_%” values. Where are those stored?

    Thread Starter JohnM

    (@jmanko)

    So I issued a GET request via the command line, and a 302 is sent by the server:

    $ telnet www.mydomain.com 80
    Trying IP.IP.IP.IP ...
    Connected to www.mydomain.com.
    Escape character is '^]'.
    GET / HTTP/1.1
    host: www.mydomain.com
    
    HTTP/1.1 302 Moved Temporarily
    Date: Tue, 10 Sep 2013 03:02:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    X-Pingback: http://site1.otherdomain.com/xmlrpc.php
    Set-Cookie: PHPSESSID=4cc5b84514446373c43349158546f87a; path=/; domain=.mydomain.com; HttpOnly
    Location: http://site1.otherdomain.com/
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    
    Connection closed by foreign host.

    This was AFTER I changed my DNA entry from a CNAME record to A Record pointing to the otherdomain.com IP.

    Is there any way to retain mydomain.com in the URL bar instead of showing the redirected site1.otherdomain.com?

    Plugin Author Ron Rennick

    (@wpmuguru)

    Is there any way to retain mydomain.com in the URL bar instead of showing the redirected site1.otherdomain.com?

    Site ID = 2 (site1.otherdomain.com)
    Domain = mydomain.com
    Primary = NO

    If you want it to stay in the address bar make it the primary URL.

    Thread Starter JohnM

    (@jmanko)

    Works! Thank you for your patience! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘CNAME and DM example’ is closed to new replies.