0

我使用 WordPress MU Domain Mapping-plugin 设置了具有两个域的 MU 安装。

系统先配置子域d2.domain1.com(在sites下,然后映射

domain2.com 到 d2.domain1.com

检查域映射中的以下设置:远程登录、永久重定向、用户域映射页面、将管理页面重定向到站点的原始域

我的问题是我无法从 domain2.com/wp-admin 访问管理员 - 它只是给了我这个错误:

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.

但是wordpress安装在/。

相关wp-config如下:

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' );
4

2 回答 2

2

这是另一种解决方案

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

到 wp-config.php 文件。

于 2013-04-15T11:35:30.777 回答
1

在子域和文件夹设置之间进行更改时,wp_site-table 中可能存在错误。确保/为主域设置路径。

于 2012-06-10T11:24:29.467 回答