以http但不以https WordPress的403响应代码

问题描述 投票:0回答:1

我有一个问题。我有一个WordPress的网站,我得到了一个403 HTTP响应代码时,我尝试用HTTP访问,但它以https效果很好。我已经觉得是有人重定向问题,所以我加入这个代码,我的.htaccess

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

你有一个想法,请...我真的不明白的地方可以来自...

谢谢

PS:

我完整的.htaccess:

# BEGIN WordPress

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

<IfModule mod_rewrite.c>
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

# END WordPress
wordpress .htaccess redirect https http-status-code-403
1个回答
0
投票

在你的htaccess的更新验证码

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

试试这个让我知道,我认为它为你工作

© www.soinside.com 2019 - 2024. All rights reserved.