首页
学习
活动
专区
圈层
工具
发布

SSL证书
EN

WordPress Development用户
提问于 2018-05-11 10:06:26
回答 1查看 148关注 0票数 0

我的网站在登陆前重定向了很多次。此问题发生在SSL证书实现后。关于如何解决这个问题的任何想法。

我的网站和Vidahost一起发布--我向他们寻求帮助,但他们一点也不知道。

不幸的是,我的编程技能是基本的,但如果有人能指出正确的方向,我可能会解决它。

https://boconlineblog.co.uk

事先非常感谢

代码语言:javascript
复制
# 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
EN

回答 1

WordPress Development用户

发布于 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文件之后,我认为问题是由以下几行引起的:

代码语言:javascript
复制
RewriteCond %{HTTP_HOST} boconlineblog\.co\.uk [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ boconlineblog.co.uk/$1 [R,L]

试着移除这些行,看看这是否解决了问题。

<#>Update 2

尝试禁用真正简单的SSL插件,并删除.htaccess文件中的所有内容,但以下内容除外:

代码语言:javascript
复制
# 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`
票数 0
EN
页面原文内容由WordPress Development提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://wordpress.stackexchange.com/questions/303305

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档