【问题标题】:I have done ssl on mmy website, roundabouttech.com. But the我在我的网站 roundabout tech.com 上完成了 ssl。但是
【发布时间】:2019-02-25 05:59:23
【问题描述】:

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

【问题讨论】:

  • 你能贴出你的htaccess代码吗?
  • 在这里公开发布是否安全。
  • 是的。您可以在此处发布 htaccess 代码。
  • RewriteBase / RewriteRule 上的 RewriteEngine ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule 。 /index.php [L]

标签: wordpress http ssl https


【解决方案1】:

试试这个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

【讨论】:

    猜你喜欢
    • 2020-07-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-07
    • 2016-06-28
    • 1970-01-01
    • 2015-09-04
    • 1970-01-01
    相关资源
    最近更新 更多