Previously, we had a subdomain multisite in /public_html/
:
www.example
(primary site)site1.example
site2.example
plus another subdirectory multisite in /site3.example/
site3.example
(primary site)site3.example/subsite4
It got decided that we'd use subdirectories across the board. So now we have
www.example
(primary site)www.example/site1
www.example/site2
All of these work fine.
However
www.example/site3
&www.example/site3/subsite4
display a 500 internal server error - too many redirects.
I've updated www.example/site3
's wp-config.php
to ensure:
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'www.example/site3');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
Its .htaccess
is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /site3/
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 . /site3/index.php [L]
</IfModule>
I've updated the tables:
wp_2_options
wp_blogs
wp_options
with the new URLs: www.example/site3
The .htaccess
in /public_html/
is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
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]
</IfModule>
The /public_html/wp-config.php
contains:
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'www.example');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );
Is the site in /public_html
causing the site in /public_html/site3
problems?
How would I resolve this, please?
Help appreciated.
Previously, we had a subdomain multisite in /public_html/
:
www.example.com
(primary site)site1.example.com
site2.example.com
plus another subdirectory multisite in /site3.example.com/
site3.example.com
(primary site)site3.example.com/subsite4
It got decided that we'd use subdirectories across the board. So now we have
www.example.com
(primary site)www.example.com/site1
www.example.com/site2
All of these work fine.
However
www.example.com/site3
&www.example.com/site3/subsite4
display a 500 internal server error - too many redirects.
I've updated www.example.com/site3
's wp-config.php
to ensure:
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'www.example.com/site3');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
Its .htaccess
is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /site3/
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 . /site3/index.php [L]
</IfModule>
I've updated the tables:
wp_2_options
wp_blogs
wp_options
with the new URLs: www.example.com/site3
The .htaccess
in /public_html/
is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
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]
</IfModule>
The /public_html/wp-config.php
contains:
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'www.example.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );
Is the site in /public_html
causing the site in /public_html/site3
problems?
How would I resolve this, please?
Help appreciated.
Share Improve this question edited Feb 4, 2022 at 13:00 Steve asked Feb 4, 2022 at 12:37 SteveSteve 1,75719 gold badges66 silver badges115 bronze badges 3 |1 Answer
Reset to default 3The problem was caused by:
define('DOMAIN_CURRENT_SITE', 'www.example.com/site3');
define('PATH_CURRENT_SITE', '/');
Changing this to:
define('DOMAIN_CURRENT_SITE', 'www.example.com');
define('PATH_CURRENT_SITE', '/site3/');
with a similar change in the wp_blogs
table solved the problem.
site3.example.com
towww.example.com/site3
– Steve Commented Feb 4, 2022 at 12:51