简体   繁体   English

迁移后 Wordpress 多站点重定向 302

[英]Wordpress multisite redirect 302 after migration

I have a multisite on my localhost, i did migration to pre-production server (changed databases etc...) and it works well.我在我的本地主机上有一个多站点,我迁移到预生产服务器(更改数据库等...)并且运行良好。 Today i did migration to production server and like pre-production i chanded all urls from database, wp-config but now i get 302 redirections (https to http).今天我迁移到生产服务器,就像预生产一样,我更改了数据库中的所有 url,wp-config 但现在我得到 302 重定向(https 到 http)。

Someone had already this issue?有人已经有这个问题了吗? i checked google and some guys suggests me to add some constants to wp-config:我查了谷歌,有些人建议我向 wp-config 添加一些常量:

define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');

to clear cookie, but this not working either, below are my wp-config and my.htaccess contents:清除 cookie,但这也不起作用,下面是我的 wp-config 和 my.htaccess 内容:

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'www.domain.com/mymultisite');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('WP_ALLOW_MULTISITE', true);
//...
define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');

// htaccess file
<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>

What i did wrong?我做错了什么? thank you谢谢你

The HyperText Transfer Protocol (HTTP) 302 Found redirect status response code indicates that the resource requested has been temporarily moved to the URL given by the Location header. HyperText Transfer Protocol (HTTP) 302 Found redirect status 响应代码表示请求的资源已暂时移动到 Location header 给出的 URL。

1- Try to restore the default htaccess file. 1- 尝试恢复默认的htaccess文件。

2- Try to deactivate all the themes and plugins, and you can do it 1 by 1. 2- 尝试停用所有主题和插件,您可以一个接一个地进行。

3- Check all the url's in the database, and try to use a plugin to edit all the links in the DB. 3- 检查数据库中的所有 url,并尝试使用插件来编辑数据库中的所有链接。

4- If nothing helps try to check the website from different pc or computer. 4- 如果没有任何帮助,请尝试从不同的个人电脑或计算机检查网站。

5- Check this topic , it might help you with the same subject. 5- 检查此主题,它可能会帮助您处理同一主题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM