首页 > 解决方案 > 我在 mmy 网站 roundabouttech.com 上完成了 ssl。但是

问题描述

我在 mmy 网站 roundabouttech.com 上完成了 ssl。但问题是当我输入完整的“ https://roundabouttech.com ”时,它会以 https 打开。但是当我只输入“roundabouttech.com”时,默认情况下它需要http。我该如何解决这个问题。我的网站在 wordpress 中。

标签: wordpresshttpsslhttps

解决方案


试试这个 htaccess 代码

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# Rewrite HTTP to HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
# END WordPress

推荐阅读