当我在中更改重定向https时。htaccess站点返回消息“太多重定向”循环。
这是修改后的。htaccess
RewriteCond %{HTTPS} off
RewriteRule (.*)$ https://www.mywebsite.it/$1 [L,R=301]
# 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]
</IfModule>
# END WordPress
我还添加了wp配置。php:
define(\'FORCE_SSL_ADMIN\', true);
define(\'FORCE_SSL_LOGIN\', true);