MaxRedirects option has been removed
In reviewing my /var/log/apache2/error_log file, I am seeing tons of error messages related to MaxRedirects (~1.2 million in the last calendar month!):
I used the grep suggestion (grep -rni --include=".htaccess" "maxredirects" /home/) from another thread (
[Fri Dec 13 14:52:09.542523 2019] [rewrite:warn] [pid 9320] AH00664: RewriteOptions: MaxRedirects option has been removed in favor of the global LimitInternalRecursion directive and will be ignored.I used the grep suggestion (grep -rni --include=".htaccess" "maxredirects" /home/) from another thread (
-
The notification you're getting is just a warning but the issue is with accounts that have: RewriteEngine on RewriteOptions MaxRedirects=10
In their .htaccess file. This isn't an actual rewrite/redirect so it's not going to show up in cPanel>>Domains>>Redirects. This is just a setting indicating that the maximum number of redirects is 10. In order to resolve this all instances of MaxRedirects will be ignored in favor of LimitInternalRecursion which is global.0 -
The notification you're getting is just a warning but the issue is with accounts that have:
RewriteEngine on RewriteOptions MaxRedirects=10
In their .htaccess file. This isn't an actual rewrite/redirect so it's not going to show up in cPanel>>Domains>>Redirects. This is just a setting indicating that the maximum number of redirects is 10. In order to resolve this all instances of MaxRedirects will be ignored in favor of LimitInternalRecursion which is global.
Hi So in order to eliminate these MaxRedirect error messages from my server, is this the correct root of the problem? There are far too many of them for it to be normal behaviour. If so, am I right to remove the MaxDirects=10 from the htaccess files that have it, or add it to the accounts which do not have it? Are these the right edits to be making to the htaccess file in order to stop these error messages occurring?0 -
I'd remove that line, yes. If that's what you're referring to. MaxRedirects at some point will be removed and be unhelpful. That warning will come up every time the .htaccess file is read which means anytime someone goes to the site. 0 -
Thanks for your help Lauren. I commented out the MaxRedirects line in htaccess and the errors stopped immediately. I'd like to mark this thread title as Solved - how do I do this please? 0 -
Hello @dermotd, I'm glad to hear you were able to stop the errors. I'll go ahead and mark the thread as Solved for you now. Thank you for choosing cPanel! Best regards 0
Please sign in to leave a comment.
Comments
5 comments