我想使用wordpress multisite。所以我将代码添加到wp config。php:
define( \'WP_ALLOW_MULTISITE\', true );
define(\'MULTISITE\', true);
define(\'SUBDOMAIN_INSTALL\', false);
define(\'DOMAIN_CURRENT_SITE\', \'localhost\');
define(\'PATH_CURRENT_SITE\', \'/multi/\');
define(\'SITE_ID_CURRENT_SITE\', 1);
define(\'BLOG_ID_CURRENT_SITE\', 1);
此外,我还将代码添加到。htaccess文件:
RewriteEngine On
RewriteBase /multi/
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).*) D:/localhost/Multi/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\\.php)$ D:localhost/Multi/$2 [L]
RewriteRule . index.php [L]
此外,我还创建了第二个网站-多/秒,我可以看到第二个网站的前端(帖子/图片…)
但当我尝试使用管理面板-多/秒/wp admin时,我得到
You don\'t have permission to access the requested directory. There is either no index document or the directory is read-protected.