gpt4 book ai didi

wordpress - WordPress 的 HTTPS 重定向

转载 作者:太空宇宙 更新时间:2023-11-03 14:37:52 26 4
gpt4 key购买 nike

我的 .htaccess 文件中有以下内容。我正在使用 Real Simple SSL 插件。在我的网站上,HTTP 没有被重定向到 HTTPS。不太确定可能是什么问题。

Order Deny,Allow
Deny from xx.xx.xx.xx
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} =mysite.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} wp-admin
RewriteRule ^(.*)$ https://www.example.com/wp-admin/ [R,L]
</IfModule>

这是 Real Simple SSL 设置的管理门户的屏幕截图。

enter image description here

最佳答案

在您的 .htaccess 中使用此规则:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ https://yoursite.com/$1 [L,R=301]
</IfModule>

关于wordpress - WordPress 的 HTTPS 重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46043031/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com