Support

Admin Tools

#37204 Regenerate causes too many redirects

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
4.1.4
PHP version
n/a
Admin Tools version
7.1.7

Latest post by TheStingPilot on Monday, 30 May 2022 08:42 CDT

TheStingPilot

Hello,

I just installed Admin Tools and had AdminTools to regenerate the .htaccess file. After that, the frontend gave me the error too many redirects on different browsers. After deleting the .htaccess file and putting back the original one, the error was gone.

With kind regards,

TheStingPilot

nicholas
Akeeba Staff
Manager

In 99.9% of these cases you have the following problem:

You have set up a $live_site in configuration.php with a URL like https://www.example.com but also set up a redirection in .htaccess maker from www to non-www (or vice versa). This creates a redirection loop because the .htaccess will redirect www.example.com to example.com and Joomla's $live_site will redirect example.com back to www.example.com. You are warned about this in the .htaccess Maker.

Another issue might be that $live_site is set to use http:// but you have enabled HSTS in the .htaccess Maker. Again, the .htaccess will redirect http:// to https:// and Joomla will redirect https:// to http:// because of the $live_site.

In all cases the correct solution is to edit configuration.php and set

$live_site = '';

You DO NOT need a non-empty $live_site. This is a remnant for some very old, very weirdly configured hosts which would not set the HOST environment variable. These were rare 17 years ago, you'd be hard pressed to find any of them still around in 2022. Therefore you do not need the $live_site.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

TheStingPilot

Hello,

$live_site = '';

That has already been set. 

If you skip the 'Regenerate' step and make the .htaccess file with the htaccess maker then there is no issue at all.

With kind regards,

TheStingPilot

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!