Php 将Wordpress multisite移动到子文件夹中的本地主机

Php 将Wordpress multisite移动到子文件夹中的本地主机,php,wordpress,.htaccess,redirect-loop,multisite,Php,Wordpress,.htaccess,Redirect Loop,Multisite,我最近在一个子文件夹中将我的网站从www删除到localhost,因此网站url如下所示:http://localhost/mysite/main 这是一个WordPress。我搜索并替换了db www.mysite.com->localhost/mysite/main 这是我的.htaccess RewriteEngine On RewriteBase /mysite/main/ RewriteRule ^index\.php$ - [L] RewriteRule ^([_0-9a-zA-Z

我最近在一个子文件夹中将我的网站从www删除到localhost,因此网站url如下所示:
http://localhost/mysite/main

这是一个WordPress。我搜索并替换了db www.mysite.com->localhost/mysite/main

这是我的.htaccess

RewriteEngine On

RewriteBase /mysite/main/
RewriteRule ^index\.php$ - [L]
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中添加了以下内容

define('WP_DEBUG', false);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'localhost/mysite/main');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
由于某种原因,我得到了一个网页重定向循环

不知道为什么


提前感谢您的帮助。

我认为这是您网站问题的www/non-www版本。确保您在数据库中完全使用了localhost/mysite/main,并且没有遗漏任何内容

此外,手动查看所有wp_x_选项表,查找三个字段,并根据需要编辑它们:

home siteurl文件上载\u url(如果您正在从子域移动到) 子文件夹,反之亦然,请记住调整.htaccess文件和 wp-config.php文件中SUBDOMAIN_INSTALL的值 因此。


谢谢你的帮助。数据库中似乎有某种东西使它发生了。