Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress Multisite: Subsite wp-admin "err_too_many_redirects"

i installed a new WordPress 4.1 multisite

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/

I have this error: Código de error: ERR_TOO_MANY_REDIRECTS

--

I can access to the Front

http://blog.urlcorrect.com/br/

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

--

I have this values:

current blog domain: blog.urlcorrect.com
current site domain: blog.urlcorrect.com
current blog path: /
current site path: /

--

BBDD (wp_blogs table)

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

--

The 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]

--

The 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?

Thanks a lot

Pablo

like image 220
Pyaw Avatar asked Feb 14 '15 18:02

Pyaw


1 Answers

(I don't take credit for the given solution) ;)

If you still have an issue with this try the solution with .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]

To this:

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.

Original solution was posted here link

like image 157
Rafał Maliszewski Avatar answered Jan 03 '23 16:01

Rafał Maliszewski