简体   繁体   English

更改Wordpress URL时在/ wp-admin上重定向循环

[英]Redirect Loop on /wp-admin when changing Wordpress URL

I'm trying to change the URL for my site, by going to settings in wp-admin and changing both site url and wp url. 我正在尝试通过转到wp-admin中的设置并更改网站url和wp url来更改网站的URL。

在此处输入图片说明

All seems well after I save changes, I'm able to navigate around my blog using the new url. 保存更改后,一切似乎都很好,我可以使用新的URL浏览我的博客。 However when I try accessing wp-admin I'm getting a redirect loop. 但是,当我尝试访问wp-admin时,出现了重定向循环。 I can still access the wp-admin login page with the old url admin site. 我仍然可以使用旧的url管理网站访问wp-admin登录页面。 In order to access my admin page again I have to login to my DB and reset both urls. 为了再次访问我的管理页面,我必须登录到我的数据库并重置两个URL。

I've also tried to add this code with my urls to my wp-config file 我也尝试将带有网址的代码添加到wp-config文件中

define('WP_HOME','http://www.sample.com');
define('WP_SITEURL','http://www.sample.com');

Other information about my setup: 有关我的设置的其他信息:

  1. Openshift is hosting wordpress with the quick start app and proper alias have been added to my app. Openshift正在使用快速启动应用程序托管wordpress,并且已将适当的别名添加到我的应用程序中。
  2. Cloudflare is managing my DNS Cloudflare正在管理我的DNS

I wouldn't think either of these factors would be the issue because the site wouldn't work at all if one of these were misconfigured, but at this point I'm drawing a blank. 我认为这两个因素都不是问题,因为如果其中一个配置错误,该站点将根本无法工作,但目前我还是一片空白。 Was thinking maybe it might have something to do with wordpress forcing SSL for wp-admin? 是否正在考虑可能与wordpress强制对wp-admin使用SSL有关?

Found It! 找到了!

I love how when you gather all the information to ask a proper question it seems to line you up for the solution. 我喜欢当您收集所有信息来提出适当的问题时,似乎会为您排忧解难。

I'm also using http://wwwizer.com/naked-domain-redirect to redirect naked domain request to www using an A record in my DNS. 我还使用http://wwwizer.com/naked-domain-redirect使用DNS中的A记录将裸域请求重定向到www。 All I had to do was turn off cloudflare's protection to this DNS entry. 我要做的就是关闭cloudflare对此DNS条目的保护。

在此处输入图片说明

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

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