WordPress.org

Support

Support » Plugins and Hacks » WordPress MU Domain Mapping » [Plugin: WordPress MU Domain Mapping] domain mapping to subdirectory

[Plugin: WordPress MU Domain Mapping] domain mapping to subdirectory

  • Beating my head on this. I’ve been through forums, andrea_r’s posts/slideshows and the docs several times.

    Seems most people are using subdomain installs on this though, according to the plugin, it ‘recently’ began supporting subdirectory installs.

    If you can help here or point me in the right direction, I’d be really grateful.

    My understanding is that users can modify their A/Cname record to point to our site “mybasedomain.com”, then under Tools | Domain Mapping, map “myblogdomain.com” to “mybasedomain.com/myblog” and booyah – great joy.

    Except I’m not feeling the joy. In doing so, “myblogdomain.com” in the browser is in fact landing at “mybasedomain.com”.

    Excellent. It ‘seems’ to me that the DNS for “myblogdomain.com” is doing it’s part and getting the user to our server.

    However, why isn’t it finishing the last step and A) at a minimum, redirecting them to “mybasedomain.com/myblog” or B) ideally, showing “myblogdomain.com” in the URL while displaying “mybasedomain.com/myblog” content?

    Here’s what I have at the bottom of wp-config.php:

    define('WP_DEBUG', false);
    define ('WP_ALLOW_MULTISITE', true  ) ;
    
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'lifemapp.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    /* That's all, stop editing! Happy blogging. */
    
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** WordPress MU Domain Mapping plugin */
    define( 'SUNRISE', 'on' );
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    Again, really appreciate ANY direction/pointers to solve this.

Viewing 15 replies - 1 through 15 (of 23 total)
  • Also, under Super Admin | Domain Mapping Configuration, we’re running with:

    CHECKED
    2 (Permanent redirect)
    3 (User domain mapping page)
    
    UNCHECKED
    1 (Remote Login)
    4 (Redirect administration pages)
    5 (Disable primary domain check)
    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    according to the plugin, it ‘recently’ began supporting subdirectory installs.

    ‘recently’ as in 2009. (I think).

    the fact you;re using subdomains should not be an issue.

    UNCHECKED
    1 (Remote Login)

    And what happens if you check this?

    And is the domain you mapped the Primary domain?

    thx Andrea – I saw your post early last year about subdirectories, so I figured ‘recently’ was long time ago! 😉

    And what happens if you check this?

    It won’t save 1 unless I check 4 at the same time so I checked both. In checking both 1/4 (so that 1-4 are all checked now) and I’m seeing the same results.

    Also, I have under the site “myblog”, Tools | Domain Mapping:

    Primary	Domain
       x	http://myblogdomain.com
    	http://mybasedomain.com/myblog

    Andrea, in my original post, I had my real domain replaced (DOMAIN_CURRENT_SITE) but when the code didn’t post correctly, I re-pasted and forgot to replace the real domain again. Would you be able/available to modify that to “mybasedomain.com”? Really appreciate it and sorry for the trouble.

    Registrar info (if helpful) currently has both A and CNAME pointing to mybasedomain.com:

    myblogdomain.com   Address Record (A)   xxx.xxx.xxx.xxx
    localhost. myblogdomain.com   Address Record (A)   127.0.0.1
    myblogdomain.com   Mail Exchange Record (MX)   preference=10, host= myblogdomain.com.
    *. myblogdomain.com   Canonical Name (CNAME)   mybasedomain.com.

    where xxx.xxx.xxx.xxx is the IP for mybasedomain.com

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Where are you hosted & what kind of control panel do you have?

    Host is Verio on a robust managed private server – no cpanel, they have a custom dns panel with multiple IPs and we manage the vhost manually with root access. Can do wildcards, but don’t think we need that for our usage – subdirectories.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    no, you don;t need wildcards. 🙂

    Did you do a ServerAlais from myblogdomain.com to mybasedomain.com?

    ServerName	mybasedomain.com
    ServerAlias	*.mybasedomain.com

    This is the only vhost config for these 2 domains. Really hoping (my understanding) that I do not have to do ServerAlias for myblogdomain.com manually – but instead users will be able to add their own via the plugin and need nothing from the server side. I’m guessing you’re just checking to trace the flow though. 🙂

    Thanks again for working through this with me. It really has me stumped.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Yes, you DO need to add a ServerAlais. That’s how the server knows where to send it. 😉

    (That’s why the instructions say “park it in cpanel” as that’s what the cpanel parking does. make it a server alias.)

    Alternatively, if you’re doing these in bulk, check the vhost section for a named wildcard host. It should send all domain requests to the folder where WordPress is installed.

    Hey Andrea – sorry for the delay, slammed this past week. I had 1 domain working without the alias, one with. I need to isolate my settings/dns, wait for propagation and test. Still thoroughly confused and appreciate your guidance once I report back to you.

    Thanks.

    I’m still confused…do we need to set up an alias for every user? I thought they are able to handle their own domain mapping via the plugin…and if they enter a domain in the plugin, that is how the server knows where to send the traffic (by getting those details from the plugin).

    Thanks,

    Mark

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    and if they enter a domain in the plugin, that is how the server knows where to send the traffic

    No.

    By entering their details in the backend of WordPress, then WordPress knows what blogs to send people to.

    You still have to set up things on the server side, so when domain requests come in for that domain, to your server, then your server sends it to your WordPress install.

    THEN the plugin kicks in.

    Andrea – is the domain parking (server side) a necessity only when having a shared IP environment or shared hosting with multiple wordpress installs?

    We moved servers and dns hosts during this exchange which made things crazy. All is settled now. Now we have a cloud of servers now each with unique IPs. All I am doing to get the plugin to work now, is what I expected/wanted. No parking/vhosts changes, just add the Domain Mapping entry for the desired blog(subdirectory), then:

    1) CNAME record pointing to our wordpress install (we had to include the “www.” here which added to part of our problem before.)

    Working Example (**take out the http://, forum here is adding that**):

    CNAME    www.    www.wordpressinstall.com

    Before we were using this which failed even though our WordPress install/site uses the non-www of http://wordpressinstall.com:

    CNAME     www.     wordpressinstall.com

    2) Since we’re using GoDaddy now exclusively for our registrar/dns, we’ve also learned that we cannot do a wildcard CNAME with them (with some dns providers you can) to route the http://mappedsite.com the same as http://www.mappedsite.com. If we REALLY want this, we had to send the A record IP to our wordpress install IP.

    We are employing this only for our domains as we’ve grown accustomed to site URLS without the www. We will condition our clients to use the www. CNAME only.

    Both 1 and 2 worked as standalone solutions after adding a Domain Mapping entry in the WordPress plugin. No server side parking required.

    That was what I was expecting, and sounds like Mark too – complete self-management by the enduser.

    However, we have not yet tested anything with multiple IPs (or same IP wordpress installs) on a single server yet. We’re hoping to do that this weekend.

    The other thing too that was blocking us before, in the Domain Mapping area for the blog/subdirectory, when using the CNAME only DNS, we were using “mappedsite.com” as our entry which failed.

    If using CNAME only, we had to put “www.mappedsite.com” in our Domain Mapping entry.

    If using both CNAME and A record, then we had to add both the www. and non-www. At that point, it’s up to personal preference which one to make the primary/default.

    But the plugin works like a dream with that configuration/knowledge.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘[Plugin: WordPress MU Domain Mapping] domain mapping to subdirectory’ is closed to new replies.
Skip to toolbar