admin管理员组

文章数量:1406306

My Wordpress multisite installation uses two sites:

Site 1: www.myexample
Site 2: blog.myexample

In addition, I own a second domain myexample2, which I would like to redirect to the subdomains of the original domain.

Here are its CNAME records in DNS settings:

; A Records
@   600  IN     A   xxx.xxx.xxx.xxx

; CNAME Records
blog    600  IN     CNAME   blog.myexample
www 600  IN     CNAME   www.myexample

The problem is that when calling blog.myexample2 the home page www.myexample gets loaded instead of blog.myexample.

The problem seems to be in some Wordpress setting, wp-config.php may be causing this.

Part of wp-config.php related to Multisite:

/* Multisite */
define( 'WP_HOME', '' );
define( 'WP_SITEURL', '' );
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'www.myexample');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 2);

define( 'NOBLOGREDIRECT', '' );

本文标签: wp configDomain not redirected correctly with Wordpress Multisite