unable to access to the dashboard of tenant sites

2019-09-12 16:17发布

问题:

I have created multi network structure but I am getting problem in a accessing the dashboard of tenant sites. My superAdmin is helpdesk.com and its tenant is abc.helpdesk.com when I am clicking mysites > abc_helpdesk > dashboard, it is redirecting me to login section, after login with the admin username thats the username what I have registered, I am redirected to the same page from where I was trying to access abc_helpdesk dashboard.

my .htaccess file has following code :-

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
# END WordPress

and in config.php I have following codes :-

define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
$base = '/';
define('DOMAIN_CURRENT_SITE', 'local.wordpress.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* That's all, stop editing! Happy blogging. */

have flushed all cookies, again I am not able to use dashboard, I can just visit the site, for any other option login page is comming and after being logged with the admin's username I am redirected to the same page where I was previously.. :(

回答1:

Actually I have to set wildcard entries in my virtual host files... i.e., in httpd-vhost.conf file i have to add new line :- ServerAlias *.local.wordpress.com

and in host file i have to add one more line 127.0.0.1 *.local.wordpress.com

and this solves my problem :)



标签: wordpress