我已将wordpress实例从生产复制到本地。在获取站点的公共端(公共主页、页面和博客帖子)后,我无法访问/wp admin/,因为该url总是重定向到/homepage。我尝试过:
更新siteurl和主页至“https://tk.local“(主页和帖子工作正常)
实现本地自签名ssl证书(如果是https问题。)切换到2019主题(主题可行,但问题仍然存在)在wp配置中设置调试常量。php删除wp配置中的调试常量。php将插件目录移到一边,替换为只包含索引的/插件。php这里是一个wp admin的卷曲:
curl -Ik https://tk.local/wp-admin/
HTTP/1.1 301 Moved Permanently
Server: nginx/1.16.0
Date: Wed, 24 Jul 2019 17:27:39 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/5.6.40
X-Redirect-By: WordPress
Location: https://tk.local/
Last-Modified: Wed, 24 Jul 2019 17:27:39 GMT
Expires: Wed, 24 Jul 2019 18:27:39 GMT
Pragma: public
Cache-Control: max-age=3600, public
ETag: "d41d8cd98f00b204e9800998ecf8427e"
Strict-Transport-Security: max-age=63072000; includeSubdomains
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-uri: /wp-admin/
显然,在生产拷贝上,wp admin url是有效的。在整个过程中,it 301从
https://tk.local/wp-admin to https://tk.local/
如何防止它重定向?