LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-14-2024, 04:35 PM   #1
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Rep: Reputation: Disabled
redirect limit exceeded


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!
 
Old 05-15-2024, 03:02 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
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.
Yes, you have a loop because of the rewrite.
Check your rules against the default wordpress .htaccess
 
Old 05-16-2024, 09:12 AM   #3
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Original Poster
Rep: Reputation: Disabled
I've tried a couple modifications, neither has helped, but neither has hurt.

RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
and
RewriteCond %{REQUEST_URI} ^/wp-admin$ [NC]
RewriteRule ^(.+)$ $1/ [R=301,L]

So I guess I just experiment.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File size limit exceeded when cp or mv from RH 9 to smbmounted win2k shares ron4linux Linux - Software 0 07-07-2004 02:03 PM
"File size limit exceeded " pulikondarajesh Red Hat 5 06-17-2004 08:06 AM
File size limit exceeded... Faeroon Linux - General 20 01-02-2003 06:57 PM
child pid xxxxx exit signal File size limit exceeded (25)" problem. bisbane Linux - General 1 10-31-2002 04:35 AM
unzipping: file size limit exceeded peeples Linux From Scratch 9 10-15-2002 07:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration