我最近将 SSL 添加到我的 wordpress 站点,现在如果有一些访问我的 http 站点,我想将它们重定向到我的 https 站点。我尝试了以下方法:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
但是得到了这个错误
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
我究竟做错了什么?