所以我有一个使用 SSL 的网站,用户选择了一些我没有注意到的东西。一旦用户单击链接,网站就会显示 SSL,当用户刷新网站时,SSL 就会消失。但是当他们点击网站上的任何链接时,它会再次出现。 SSL 只有在有人刷新页面时才会消失。
网站的所有链接都是安全的 Secure
刷新页面后网站SSL没有出现 Non-Secure
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# Redirect non www. to www.
RewriteCond %{HTTP_HOST} !^www\.website\.co\.uk
RewriteRule (.*) https://www.website.co.uk/$1 [R=301,L]
# Redirect http to https editor nathan 18/01/2017
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1? [R=301,L]
最佳答案
我决定检查 Google Chrome F12 -> 网络,我注意到了
Mixed Content The site includes HTTP resources. Reload the page to record requests for HTTP resources
我注意到 favicon.ico 使用的是 http 而不是 https:现在已修复
<link rel="icon" href="https://www.website.co.uk/favicon.ico" type="image/x-icon">
关于php - 站点使用 SSL 保护,但当刷新 SSL 消失时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42530071/