WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
Second domain mapping not working (11 posts)

  1. jashimili
    Member
    Posted 11 months ago #

    I did everything exactly the same as in first domain that i mapped and second domain i added is not working.

    I don't understand one thing now. In Network admin > Settings > Domains, for what website do i check primary checkmark? My main website is website where i installed wordpress, few weeks ago i followed instructions on wordpress and on domain mapping pages to add my second website in network and that was first subdomain and for that i checked primary and everything works fine.

    Now when i try to add second website everything works fine just as subdomain. If i try to map it to domain name it wont load. mapping works but only if i uncheck primary for second domain, but in that case website loads and show as subdomain of network, it's not mapped to second domain. if i check primary. it tries to load but fail after some time. in dns and alias settings on my hosting everything is same as on first subdomain i mapped.

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

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 11 months ago #

    How long ago did you change your DNS?

  3. jashimili
    Member
    Posted 11 months ago #

    a day ago, but im using google dns on my network so it usually accept changes in only couple of hours. i also have to mention that i updated wordpress to 3.6 yesterday.

  4. jashimili
    Member
    Posted 11 months ago #

    The dns works fine, with mapping turned off when i type thirddomain.com i get redirected to thirddomain.firstdomain.com but mapping is not working. When i insert domain in list if i uncheck primary it just loads with uld thirddomain.firstdomain.com. if i check primary it show it loads thirddomain.com but after some time it gets error could not load a page.

  5. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 11 months ago #

    Check to see if you have a redirect for that domain somewhere.

  6. mmocholi
    Member
    Posted 11 months ago #

    Hello,
    the first, sorry for my english.

    I have a wordpress multisite installed in a subdomain
    news.mydomain.com

    I have content on the following websites:
    http://www.mydomain.com
    http://www.mydomain.es
    http://www.mydomain.fr
    http://www.mydomain.de

    I have followed all the steps in this topic to get:

    http://www.mydomain.com/news/
    http://www.mydomain.es/noticias/
    http://www.mydomain.fr/informations/
    http://www.mydomain.de/info/

    I have edit table wp_x_options:
    siteurl: http://www.mydomain.com/news/
    home: http://www.mydomain.com/news/
    ...
    table wp_blogs:
    domain: http://www.mydomain.com
    path: /news/

    table wp_domain_mapping:
    domain: http://www.mydomain.com/news/
    ...

    on my server there are more sites, so I've configured in the apache
    AliasMach ./info(.*) news.mydomain.com$1

    .htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    wp-config file:

    define('WP_DEBUG', false);
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    
    /* ¡Eso es todo, deja de editar! Feliz blogging */
    
    /** WordPress absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    define( 'SUNRISE', 'on' );
    require_once(ABSPATH . 'wp-settings.php');

    displays the wordpress installed on news.mydomain.com correctly,
    but NOT the posts, pages, links, etc. and displays the index for each domain.
    Example:
    http://www.mydomain.com/news OK
    http://www.mydomain.com/news/2013/07/31/hola-mundo KO (display http://www.mydomain.com)

    CAN SOMEONE HELP??

  7. mmocholi
    Member
    Posted 11 months ago #

    I wrote wrong in the message this line:
    AliasMatch ./info(.*) /var/www/htdocs/news.mydomain.com$1

  8. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 11 months ago #

    Why did you do this:

    I have edit table wp_x_options:
    siteurl: http://www.mydomain.com/news/
    home: http://www.mydomain.com/news/

    Domain mapping is for mapping domains, It is not for mapping domains and paths

    table wp_domain_mapping:
    domain: http://www.mydomain.com/news/

    I'm not sure what you are trying to accomplish but given the complexity you might want to consider just make each site a separate WP install.

  9. jashimili
    Member
    Posted 11 months ago #

    I have just deleted my website and did whole process again and now it's working.

  10. mmocholi
    Member
    Posted 11 months ago #

  11. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 11 months ago #

    @mmovholi - It would be less work in the long run to just have separate WP installs in the folders where you you want WP.

Reply

You must log in to post.

About this Plugin

About this Topic