Support

Admin Tools

#35467 htaccess maker - Redirect www and non-www addresses not available?

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
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by Chacapamac on Monday, 05 July 2021 09:19 CDT

Chacapamac

I just install a test site in a sub-domain with its own public_html using your great infos on my post #35404.

It work perfectly triple Thank You on that....

Redirect ON, Clean Url and I use (as I always do) an htacces mafe with your Htacces Maker.

 

In the Htacces Maker you have the “Redirect www and non-www addresses” settings. Curiously, I’m not able to acces any other scrolling options than “Do not redirect” - No other choices available ?

 

Do I have to add the code to the htacces Maker custom code input or manually to the file ?

I have a set of rules that I use that take care of the www redirection and the 301 permanent redirect...

Maybe cause by the sub-domain situation, I’m not sure.

I dont think its really important just for testing anyway.....

Good Day Nicholas!

nicholas
Akeeba Staff
Manager

You have set the $live_site in your configuration.php file. This causes this setting to become unavailable to prevent silly mistakes.

For example, if your setting there is “https://www.example.com” you can't do www to non-www redirection as this would lead to an infinite redirection loop. The .htaccess would redirect from www.example.com to example.com and then Joomla would redirect from example.com to www.example.com. This would be going on and on until your browser would give up after 20 redirection attempts.

In this example the non-www to www redirection would also make no sense since Joomla would already be doing that.

DO NOT set the $live_site in configuration.php. There are several implication when you do that. It breaks things such as Joomla's Enforce SSL option, it breaks non-www to www redirections, it may even break several forms on your site. It's an all around bad idea and I'm surprised that Joomla has neither realised the implications nor has it taken steps to remove it.

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!

Chacapamac

I’m so habit to set that on my sites, yeah weird Joomla didn’t trash that configuration.php setting?

 

Thanks Nicholas, Fix & Solved!

 

Good day to Akeeba!

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!