我的网站在登陆前重定向了很多次。此问题发生在SSL证书实现后。关于如何解决这个问题的任何想法。
我的网站和Vidahost一起发布--我向他们寻求帮助,但他们一点也不知道。
不幸的是,我的编程技能是基本的,但如果有人能指出正确的方向,我可能会解决它。
事先非常感谢
# BEGIN Really_Simple_SSL_HSTS
Header always set Strict-Transport-Security: "max-age=31536000" env=HTTPS
# END Really_Simple_SSL_HSTS
# BEGIN Really_Simple_SSL_UPGRADE_INSECURE_REQUESTS
Header always set Content-Security-Policy "upgrade-insecure-requests;"
# END Really_Simple_SSL_UPGRADE_INSECURE_REQUESTS
# BEGIN rlrssslReallySimpleSSL rsssl_version[2.5.26]
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# END rlrssslReallySimpleSSL
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php71” package as the default “PHP” programming language.
AddType application/x-httpd-ea-php71 .php .php7 .phtml
# php -- END cPanel-generated handler, do not edit发布于 2018-05-11 10:12:12
您可能需要更改您的“WordPress地址(URL)”和“站点地址(URL)”,以包括“https”,而不是WordPress设置页中的“http”,它们位于:Settings -> General Settings下。
如果这不能修复它,那么尝试让它使用‘非常简单的SSL’插件:https://en-gb.wordpress.org/plugins/really-simple-ssl/
更新
在查看了您的站点.htaccess文件之后,我认为问题是由以下几行引起的:
RewriteCond %{HTTP_HOST} boconlineblog\.co\.uk [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ boconlineblog.co.uk/$1 [R,L]试着移除这些行,看看这是否解决了问题。
<#>Update 2
尝试禁用真正简单的SSL插件,并删除.htaccess文件中的所有内容,但以下内容除外:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php71” package as the default “PHP” programming language.
AddType application/x-httpd-ea-php71 .php .php7 .phtml
# php -- END cPanel-generated handler, do not edit`https://wordpress.stackexchange.com/questions/303305
复制相似问题