Php 正在尝试禁用wordpress重定向到https
我希望建立一个wordpress网站的测试版本,而不是 https,因此我可以修复自发布以来出现的各种问题 移动到新的托管服务 测试站点正在重定向到https-它返回指向活动域的301 我正在使用nginx,因此.htaccess文件被忽略(这是其他问题的根源) 该站点确实正确地提供了非php内容和带有phpinfo()的.php文件 在它里面,发球是正确的。因此,这似乎是wordpress或插件问题 所以我重命名了插件目录,禁用所有插件并重新启动,重定向仍然发生!我已清除nginx的缓存和浏览器的缓存 如何进一步诊断该问题?下面我复制了测试站点的nginx配置 thebe上testdomain.com的语句。 服务器{ 服务器名称testdomain.com; 听80Php 正在尝试禁用wordpress重定向到https,php,wordpress,nginx,Php,Wordpress,Nginx,我希望建立一个wordpress网站的测试版本,而不是 https,因此我可以修复自发布以来出现的各种问题 移动到新的托管服务 测试站点正在重定向到https-它返回指向活动域的301 我正在使用nginx,因此.htaccess文件被忽略(这是其他问题的根源) 该站点确实正确地提供了非php内容和带有phpinfo()的.php文件 在它里面,发球是正确的。因此,这似乎是wordpress或插件问题 所以我重命名了插件目录,禁用所有插件并重新启动,重定向仍然发生!我已清除nginx的缓存和浏览
fastcgi_read_timeout 300;
root /home/ian/websites/testdomain/htsecure;
index index.php;
fastcgi_index index.php;
#
access_log /var/log/nginx/testdomain.access.log;
error_log /var/log/nginx/error.log;
#
location = /favicon.ico {
log_not_found off;
access_log off;
}
# disallow hot linking to images
location ~ .(gif|png|jpg|jpeg)$ {
valid_referers none blocked testdomain.com;
if ($invalid_referer) {
return 403;
}
}
# server static files that exist
location / {
try_files $uri $uri/ /index.php?$args;
}
# send .php files to fastcgi
location ~ \.php$ {
# Zero-day exploit defense - http://forum.nginx.org/read.php?2,88845,page=3
try_files $uri =404; # only if they exist!
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root@fastcgi_script_name;
include /etc/nginx/fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
}
}通过在
wp config.php
文件(位于根目录中)中添加以下行,使用非https域配置Wordpress:
背景
重定向可能由以下几方面引起:
理想情况下,Wordpress不会通过一些模糊的代码随意执行重定向——因此,禁用所有插件应该会停止重定向。然而,您可能错过的一个重定向是Wordpress本身立即执行的重定向,以强制站点仅从服务器加载。您应该更新数据库中的URL设置。例如,您可以使用此链接-。我希望它能帮助你
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );