【问题标题】:Wordpress SSL - Request exceeded the limit of 10 internal redirectsWordpress SSL - 请求超出了 10 个内部重定向的限制
【发布时间】:2019-03-08 14:54:05
【问题描述】:

我从我的 Wordpress 网站更改了 URL 以使用“https://”,当在“设置”>“常规选项”以及 .htaccess 文件中添加更改时,我在服务器上返回内部错误。

apache日志有如下信息:

[Wed Oct 03 07:29:10 2018] [error] [client 177.73.98.2] 由于可能的配置错误,请求超出了 10 个内部重定向的限制。如有必要,使用“LimitInternalRecursion”增加限制。使用'LogLevel debug'获取回溯。Referer:https://meusite.com.br/

 我的 .htaccess 我设置了以下规则来强制使用 SSL

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^ index \ .php $ - [L]
RewriteCond% {REQUEST_FILENAME}! -F
RewriteCond% {REQUEST_FILENAME}! -D
RewriteRule. /index.php [L]
RewriteEngine On
RewriteCond% {SERVER_PORT} 80
RewriteRule ^ (. *) $ https://meusite.com.br/$1 [R, L]
</ IfModule>`

【问题讨论】:

    标签: php wordpress ssl


    【解决方案1】:

    不要更改您的 .htaccess 文件。 您遇到此问题的原因是因为 WordPress Admin 中的 WordPress Address (URL)Site Address (URL) 设置仍指向您的 URL 的 http 版本。

    发生的情况是,当访问者访问您的网站时,.htaccess 规则将他的请求重定向到 https 版本,然后加载 WordPress,它识别出设置指向 http 版本并因此触发重定向到 @987654329 @ 版本。这个重定向再次被.htaccess 规则捕获,并一直持续到超时。

    您需要做什么:
    1.删​​除对.htaccess文件的任何修改。
    2. 在您的 Wordpress 管理员中更新 WordPress Address (URL)Site Address (URL) 以将它们指向 URL 的 https 版本。
    3.安装WordPress HTTPS (SSL) Plugin

    【讨论】:

    • 我的error_log返回消息:[Thu Oct 04 06:50:38 2018] [alert] [client 69.162.124.233] /home/storage/6/ea/ea/meusite/public_html/.htaccess: &lt;Directory not allowed here, referer: http://meusite.com.br/[Thu Oct 04 06:50:52 2018] [alert] [client 193.236.44.120] /home/storage/6/ea/ea/meusite/public_html/.htaccess: &lt;Directory not allowed here, referer: https://www.google.com/我认为可以是 AllowOverride All Order allow,deny
    • 我的回答是don't modify .htaccess。我无法帮助您处理 .htacces 规则
    • 在链接中,它给出了更改 .htaccess 的建议,但实际上并非如此。
    • 我没有在 .htaccess 中添加任何内容我只是将 url 更改为 https,我已经禁用了插件和主题,我的 apache 日志仍在继续:Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.@Jaswinder Singh 你能帮我吗?
    • 我推荐的插件你安装了吗?
    猜你喜欢
    • 2013-10-04
    • 1970-01-01
    • 2018-03-18
    • 2013-06-07
    • 1970-01-01
    • 1970-01-01
    • 2014-09-25
    • 2014-08-05
    • 2017-06-01
    相关资源
    最近更新 更多