When I set the “/wp/” in PATH_CURRENT_SITE and call the network setting page(xxx.com/wp/wp-admin/network), it occurs too many redirects. But when I just set “/” in the PATH_CURRENT_SITE and I go to network setting page from wordpress admin management page, it calls “xxx.com/wp-admin/network”.Then, I change the url like “xxx.com/wp/wp-admin/network” manually, it works well. Does my nginx configuration wrong?

This is my nginx conf file.

if (!-e $request_filename) {
rewrite wp/wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/wp/.*.php) $2 last;
}

location / {
 try_files $uri $uri/ /index.php?$query_string;
}

This is my wp-config file.

define('WP_DEBUG', true);
define ('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', $_SERVER['SERVER_NAME']);
define('PATH_CURRENT_SITE', '/wp/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

Read more here: how do I configure nginx for wordpress multisite, it occurs ERR_TOO_MANY_REDIRECTS


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: