简体   繁体   English

将http传输到Wordpress中的https

[英]Transfer http to https in Wordpress

I've been using more method transfers http to https. 我一直在使用更多方法将http传输到https。 But I have a problem When typing the name of the site, It is always show http: // but When I try to type https: // mywesite.com is still work Now, I want my webite is always appear https when user typing my website 但是我有一个问题,当键入站点名称时,它始终显示http://,但是当我尝试键入https:// mywesite.com仍然有效时,我希望我的网站在用户键入时始终显示https我的网站

代码示例,粘贴为图形

代码示例,粘贴为图形

What you're looking for is just to mask the URL without having a SSL. 您正在寻找的只是在没有SSL的情况下屏蔽URL。

The only way to achieve it is by modifying your htacess file that's currently located in your server. 实现此目标的唯一方法是修改服务器中当前的htacess文件。

# Force HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

This will work with your request. 这将满足您的要求。

Encryption is accomplished by the web server, not Wordpress. 加密是通过Web服务器而不是Wordpress完成的。 When the server receives your HTTP request, it can forward your browser to HTTPS. 服务器收到您的HTTP请求时,可以将您的浏览器转发到HTTPS。

  • HTTPS means HTTP Secure. HTTPS表示HTTP安全。 Security is accomplished by using an SSL certificate to encrypt transmitted data. 通过使用SSL证书对传输的数据进行加密来实现安全性。

  • Unless you are actually using SSL, you shouldn't rewrite http to https , because that will falsely imply the connection is secure. 除非您实际使用SSL,否则您不应该将http重写为https ,因为这会错误地暗示连接是安全的。

HTTPS Documentation HTTPS文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM