wordpress - 我在 mmy 网站 roundabouttech.com 上完成了 ssl。但是
问题描述
我在 mmy 网站 roundabouttech.com 上完成了 ssl。但问题是当我输入完整的“ https://roundabouttech.com ”时,它会以 https 打开。但是当我只输入“roundabouttech.com”时,默认情况下它需要http。我该如何解决这个问题。我的网站在 wordpress 中。
解决方案
试试这个 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
推荐阅读
- python - 时间解析器将无法单独运行,但总的来说它不会
- autofac - 使用 Resolve 获取类型时,如何为该类型的属性设置值
- flutter - 有什么方法可以依赖颤动的 pubspec 中的任何 git 引用吗?
- php - Woocommerce - 找出购物车中的商品超过 50 公斤
- java - 如何在字符串数组中找到公平索引的字母
- python - 如何根据 Pandas 中“Col1”之后创建的列更新“Col1”列的值
- javascript - editorconfig 不保留 Github Repo 文件的格式
- python - 如何让 Selenium 始终打开同一个应用程序的应用程序超链接?
- c++ - C ++字符串比较帮助我
- laravel - Laravel Livewire 事件侦听器未触发