Wordpress 多站点:子站点 wp-admin “err_too_many_redirects" [英] Wordpress Multisite: Subsite wp-admin "err_too_many_redirects"
问题描述
我安装了一个新的 WordPress 4.1 多站点
i installed a new WordPress 4.1 multisite
我可以导航 Front 并访问主站点仪表板
I can navegate Front and access to the main site dashboard
http://blog.urlcorrect.com/wp-admin/
我创建了一个子网站,但无法访问子网站仪表板
I created a subsite and i can´t access to the subsite dashboard
http://blog.urlcorrect.com/br/wp-admin/
我有这个错误:代码错误:ERR_TOO_MANY_REDIRECTS
I have this error: Código de error: ERR_TOO_MANY_REDIRECTS
--
我可以进入前线
http://blog.urlcorrect.com/br/
但是没有样式,css url不正确(Page not found):
but without styles, the css url is incorrect (Page not found):
http://blog.urlcorrect.com/br/wp-content/themes/twentyfifteen/style.css?ver=4.1
--
我有这样的价值观:
current blog domain: blog.urlcorrect.com
current site domain: blog.urlcorrect.com
current blog path: /
current site path: /
--
BBDD(wp_blogs 表)
blog_id: 1
site_id: 1
domain: blog.urlcorrect.com
path: /
public: 1
blog_id: 2
site_id: 1
domain: blog.urlcorrect.com
path: /br/
public: 1
--
htaccess:
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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
--
wp-config.php
/* Multisite */
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'blog.urlcorrect.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
--
我找不到正确答案.我做错了什么?
I can´t find the correct answer. What i´m doing wrong?
非常感谢
巴勃罗
推荐答案
(我不相信给定的解决方案);)
(I don't take credit for the given solution) ;)
如果您对此仍有问题,请尝试使用 .htaccess 的解决方案.
If you still have an issue with this try the solution with .htaccess.
通过 WP Network 安装更改给定的 .htaccess 模板:
Change given .htaccess template by WP Network installation:
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).*) featured/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ featured/$2 [L]
RewriteRule . index.php [L]
为此:
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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
解决我和你类似的问题.
Works with mine similar problem to yours.
原始解决方案发布在这里link
Original solution was posted here link
这篇关于Wordpress 多站点:子站点 wp-admin “err_too_many_redirects"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!