Article 6MT8D redirect limit exceeded

redirect limit exceeded

by
vinmansbrew
from LinuxQuestions.org on (#6MT8D)
Rhel 7.9 latest wordpress install using wordfence for security.

I have a server with 4 wordpress installs. Three work fine, so I don't "think" apache is the issue.
The install having the problem is a multi-site install.
The error generated is :
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.

I've checked and I feel like it's something with the .htaccess file. The problem occurs when I got to a subsite, and try to log in. If I go to the main url, I can log in fine. I can get to the subsite url, it's the login part that then fails.
I disabled a few plugins, and uninstalled some inactive plugins. This seems to have temporarily cleared the problem, but the error still shows up. I even deactivated wordfence for a bit, just to see if that changed anything, since wordfence has some .htaccess files. It made no difference, so I think the site ./htaccess is the problem.

Here is the whole file:
Code:RewriteEngine On
RewriteBase /

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
#RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ - [L]
RewriteRule . index.php [L]

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

# Wordfence WAF
<IfModule mod_php5.c>
php_value auto_prepend_file '/var/www/html/blog/wordfence-waf.php'
</IfModule>
<IfModule mod_php7.c>
php_value auto_prepend_file '/var/www/html/blog/wordfence-waf.php'
</IfModule>
<IfModule mod_php.c>
php_value auto_prepend_file '/var/www/html/blog/wordfence-waf.php'
</IfModule>
<Files ".user.ini">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</Files>
There are a lot of rewriterule and rewritecond in the file. I imagine it has to be there, but I'm not sure which 1 it would be.

The problem seems to have recently cropped up. I never noticed, as I use the main page for admin work.
Any ideas welcome. I can make backups, and since this is virtual, I can snapshot it and utterly beat on it, if I want. Thanks!
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments