我的 WP 站点从 HTTPS 重定向到 HTTP,但帖子没有 [英] My WP site redirects from HTTPS to HTTP but posts don't

查看:36
本文介绍了我的 WP 站点从 HTTPS 重定向到 HTTP,但帖子没有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的 .htaccess 文件的内容

Here are contents of my .htaccess file

# BEGIN WordPress
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    RewriteCond %{HTTPS} on
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</IfModule>
# END WordPress

推荐答案

您需要在 wp-config 文件中添加 home url 和 site url

You need to add home url and site url in your wp-config file

define('WP_HOME','http:example.com');
define('WP_SITEURL','http:example.com');

这篇关于我的 WP 站点从 HTTPS 重定向到 HTTP,但帖子没有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆