0

The admin dashboards of my multisite and subsites are painfully accessible. The error message says : '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 tried many .htaccess code snippets (Code snippet 1, Code snippet 2), but none of them matched my needs.

I'm working on a dev server. The URL format of the multisite looks like this : www-dev.example.com -> for the main site. The subsites URL formats depend on the country : fr-dev.example.com or uk-dev.example.com.

Here is the Rewrite rule of my .htaccess file :

RewriteEngine On
RewriteBase /

RewriteRule ^category-product/([^\/]+)/([^\/]+)/([^\/]+)/([^\/]+)/?$ index.php?product_cat=$1&produit=$2&aff=$3&nom=$4 [L]
RewriteRule ^categorie-produit/([^\/]+)/([^\/]+)/([^\/]+)/([^\/]+)/?$ index.php?product_cat=$1&produit=$2&aff=$3&nom=$4 [L]
RewriteRule ^sitemap-product-([^\/]+).txt/?$ /sitemap-product.php?country=$1 [L]

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).*) wp/$1 [L]
RewriteRule ^(.*\.php)$ wp/$1 [L]
RewriteRule . index.php [L]

Can anyone please tell me what I'm missing and why do these redirections happen to be ?

PS : I'm sorry but I'm not allowed to give website access URL.

  • Good that you have shown your htaccess file in your question. You need to do let us know sample of URLs like FROM which url TO which url you want to redirect/rewrite? No need to give exact urls, just samples like `http://localhost:80/test/blabla` like this will be fine. But provide all info like from font-end which url you need by which back-end url, thank you. – RavinderSingh13 Jan 19 '21 at 12:19
  • Hi, thanks for your interest for my issue. Unfortunately I'm not aware of which URL should be redirected to which URL. All I know is that the problem is in the /wp-admin section. If this can help : I've noticed that at a certain moment, I have correct access to the admin, but when I click on the 'Plugins' tab of WordPress dashboard menu, the infinite redirection loop starts and I can no longer navigate in the admin section. – Paul Maudry Jan 19 '21 at 12:31
  • Ok, here is how I will troubleshoot this one, NOTE: make sure you are testing these in a non-production/live environment OR in your Local system only. Try to have one rule at a time(eg--> comment all rules apart from 1st rule then test, note the behavior THEN comment every other rule apart from 2nd Rule and test and so on), if you do this you will have a full details which rule is the culprit, try it out carefully and let us know how it goes. If you could share details which I asked in my 1st comment, I would have gone for some other approach; let's try it and let us know then. – RavinderSingh13 Jan 19 '21 at 12:35
  • When I comment line 'RewriteRule ^ - [L]' and I try going in my admin dashboard (/wp-admin), I have a 404 because an extra 'wp' has been added to URL like so : www-dev.example.com/wp/wp-admin. – Paul Maudry Jan 19 '21 at 13:51
  • I confirm that it's only when I click on the 'Plugins' tab when I'm in the dashboard that the admin spins infinitely. After I clicked, I can't access the admin correctly anymore. – Paul Maudry Jan 19 '21 at 13:52
  • Sorry its not clear, could you please do mention details more clearly here, like which url with which rule(un-commenting) is working and whichever is not working, thank you. – RavinderSingh13 Jan 19 '21 at 16:13

0 Answers0