gpt4 book ai didi

linux - 在我的 htaccess 中重定向导致 503 服务器太忙

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:32:08 25 4
gpt4 key购买 nike

我的服务器上出现了一堆 503,但我不明白为什么。似乎与重定向相关,因为我的错误日志中充斥着如下错误:

[Fri Aug 15 09:27:09 2014] [error] [client xx.xxx.x.xxx] 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.
[Fri Aug 15 09:27:09 2014] [debug] core.c(3072): [client xx.xxx.x.xxx] r->uri = /wp/wp/wp/wp/wp/wp/wp/wp/wp/wp/login.php

这是我的 htaccess 的内容:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ wp/$1 [L]

Include includes/ul-rewrites.txt

RewriteCond %{HTTP_HOST} !^.*\.xxx\.com
RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !^/(search|newsroom|aboutul|offerings|blog|es|fr).*$
RewriteRule ^(.*)$ http://site.xxx.com/$1 [R=302,L,NE]

RewriteRule . index.php [L]

</IfModule>

最佳答案

您的 .htaccess 中有问题的行是:

RewriteRule ^(.*\.php)$ wp/$1 [L]

服务器收到对/login.php的请求,将其重写为/wp/login.php,然后再次将其重写为/wp/wp/login.php 等等等等

添加重写条件以排除已经正确具有/wp/的请求应该可以解决此问题。例如:

RewriteCondition %{REQUEST_URI} !^/wp/.*$
RewriteRule ^(.*\.php)$ wp/$1 [L]

关于linux - 在我的 htaccess 中重定向导致 503 服务器太忙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25331674/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com