LimitInternalRecursion error

时间:2016-09-24 作者:Rohit Manglik

很抱歉这个愚蠢的问题。事实上,我不是Wordpress开发人员,我不知道下面的代码在中做什么。htaccess文件。

我遇到了很多这样的错误:

AH00124: 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

AH00124: 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., referer: https://website.com/wp-admin/customize.php?theme=handystore&return=%2Fwp-admin%2Fthemes.php%3Factivated%3Dtrue

从博客中,我了解到上述错误与中的以下重写条件有关。htaccess文件。整个内容是通过插件生成的,是一些插件的遗留部分。

# Start BWP Minify WP Rules 
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([_0-9a-zA-Z-]+/)?(cache/minify-.*\\.(js|css))$ $2 [L]
</IfModule>
# END BWP Minify WP Rules
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)$ $1 [L]
RewriteRule . index.php [L]
# 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>
请帮助解决上述错误。

1 个回复
SO网友:Rohit Manglik

我删除了下面的行,错误消失了。

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)$ $1 [L]
RewriteRule . index.php [L]