在上设置多站点后http://localhost, 请求发送至http://localhost 重定向到http://production-domain.com (包括“登录”)。
生产域信息甚至从何处检索我怀疑原因是wp配置的修改。php或。htaccess文件。如果我恢复这些更改,站点将再次正常工作(尽管没有多站点)
Log In is also affected:
<多站点前:加载
http://localhost/wp-admin/已重定向到
http://localhost/wp/wp-login.php?redirect_to=http://localhost/wp/wp-admin/&reauth=1(登录页面样式正确。)多站点加载后http://localhost/wp-admin/已重定向到http://www.production-domain.com/wp-login.php?redirect_to=http://localhost/wp/wp-admin/&reauth=1(登录页面缺少样式,因为css无法从加载http://www.production-domain.com.)<人力资源>
How I configured multisite.:
Added following lines to c:/www/wp/wp-config.php:
define( \'WP_ALLOW_MULTISITE\', true );
define(\'MULTISITE\', true);
define(\'SUBDOMAIN_INSTALL\', false);
define(\'DOMAIN_CURRENT_SITE\', \'localhost\');
define(\'PATH_CURRENT_SITE\', \'/\'); // Also tried: define(\'PATH_CURRENT_SITE\', \'/wp/\');
define(\'SITE_ID_CURRENT_SITE\', 1);
define(\'BLOG_ID_CURRENT_SITE\', 1);
(Already had this in /www/wp/wp-config.php:)
// Overwrites the database to save from constantly editing the DB
define(\'WP_HOME\',\'http://localhost/\');
define(\'WP_SITEURL\',\'http://localhost/wp\');
c:/www/.htaccess:
# Original version left as comments at bottom.
# Note WordPress is installed in the wp subdirectory
# so there is another file, c:/www/wp/.htaccess
# which I have tried both editing and leaving intact.
RewriteEngine On
RewriteBase /
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).*) wp/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\\.php)$ wp/$2 [L]
RewriteRule . index.php [L]
# <IfModule mod_rewrite.c>
# RewriteEngine On
# RewriteBase /
# RewriteRule ^index\\.php$ - [L]
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule . /wp/index.php [L]
# </IfModule>
#
# # BEGIN WordPress
# <IfModule mod_rewrite.c>
# RewriteEngine On
# RewriteBase /wp/
# RewriteRule ^index\\.php$ - [L]
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule . /wp/index.php [L]
# </IfModule>
#
# # END WordPress