网站仅在Safari中使用www时显示Inescure连接

发布于 2025-02-12 03:21:05 字数 1229 浏览 1 评论 0原文

我有一个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> 

我试图用www重定向的任何内容以使用https:// .....但仍然不起作用。有什么想法可以帮助吗?

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?
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沒落の蓅哖 2025-02-19 03:21:05

您购买的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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文