网站仅在Safari中使用www时显示Inescure连接
我有一个wordpress网站在VPS服务器上,它在使用
# BEGIN rlrssslReallySimpleSSL rsssl_version[2.3.14]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSL
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
</IfModule>
I have a wordpress site thats on a vps server where it keeps showing insecure site when accessing with www.mydomain.com
I do have a ssl installed and it works fine on all other browsers but with safari i keep getting that error. My .htaccess file looks like so
# BEGIN rlrssslReallySimpleSSL rsssl_version[2.3.14]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSL
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
</IfModule>
Where i am trying to redirect anything with a www to just use https://..... but still doesnt seem to work. Any ideas that can help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您购买的SSL必须由浏览器,Safari(在您的情况下)信任,如果您的浏览器太老了,则不会在浏览中安装CA(证书授权),您可以更新您的浏览器以获取最新的CAS或从旧浏览器信任的CA购买新的SSL,您可以在此处找到Safari(取决于版本)的可信根证书列表。 -us/ht209143“ rel =“ nofollow noreferrer”> https://support.apple.com/en-us/ht209143
另一种选择,但是如果您打算让您的网站/网站/网站/网站,这不是一个好的解决方案WebApp Public是要在您的浏览器中手动导入证书并获得绿色锁,这是如何将P12文件导入Safari https://www.digicert.com/kb/ssl-support/p12-import-import-export-export-export-mac-mac-server.htm ,但这再次不是公开使用的解决方案
The SSL that you bought must be trusted by the browser,Safari in your case, if your browser is too old , the CA (certificate authority) won't be installed in your browse , you can either update your browser to get the latest CAs or buy a new SSL from a CA that is trusted by your old browser , you can find a list of trusted root certificates by Safari (depending on the version) here https://support.apple.com/en-us/HT209143
An other option, but this is not a good solution if you plan to make your website / webapp public , is to import manually the certificate into your browser to trust it and get the green lock , here is how to import a p12 file into safari https://www.digicert.com/kb/ssl-support/p12-import-export-mac-server.htm , but again this is not a solution for public usage