0
votes

I've set up a MU install with two domains, using the WordPress MU Domain Mapping-plugin.

The system is first configured with subdomain d2.domain1.com (under sitesand then mapped

domain2.com to d2.domain1.com

The following settings in domain mapping are checked: Remote Login, Permanent redirect, User domain mapping page, Redirect administration pages to site's original domain

My problem is that I can't access the admin from domain2.com/wp-admin - it just gives me this error:

Now The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.

But the wordpress IS installed in /.

Relevant wp-config below:

define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
// $base = '/';                                                                                                                                      
define( 'DOMAIN_CURRENT_SITE', 'domain1.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
define( 'NOBLOGREDIRECT', 'http://domain1.com' );
2

2 Answers

2
votes

This is another solution

define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');

to wp-config.php file.

1
votes

When changing between subdomain and folder-setup, there might be a error in the wp_site-table. Make sure that the path is set to / for the main domain.