Support

Admin Tools

#17167 [AT] Redirect non-www to www doesn't work

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 nicholas on Wednesday, 21 August 2013 03:41 CDT

Spark
Good morning Nicholas,

I'm having issues with redirecting non-www to www for a clients site which has SSL. I used the same settings as for my site but somehow it doesn't work for his site. I've looked into it for a couple of hours but just can't see why it doesn't work... I've generated the htaccess with your htaccessmaker and forced the entire site to use SSL with the global configuration options of Joomla.

1. With the setup described above I get an error that the page is being redirected incorrectly. I see in Firebug, it just keeps on looping with a 301 redirect till it gives up.
2. The .htaccess is active immediately so that's ok
3. If I enter the non-www variant, it redirects to http://www.site.ext, without SSL. Perhaps there are issues with the SSL part?
4. Cleared the browser cache and cookies (using FireFox just in case)
5. Index.php is being rewritten to / so mod_rewrite works fine I suppose (I don't see it in phpinfo() but neither do I see it for my site, only for localhost with apache2handler)

Before I'd bug you I asked the client to contact the host. This was their answer:
I think it's because the SSL only works with "site.ext" without www by default.



We recommend the URL https://site.ext/



However if it's important for you to have the URL https://www.site.ext, we can

change the certificate.



Joomla's "force ssl" option should work fine with our SSL system.


I don't think it makes sense, because without the redirect the site works for both https://site.ext and https://www.site.ext. Also when I redirect www to non-www with you htaccessmaker, nothing happens.

Joomla! version: (3.1.5)
PHP version: (5.3.27)
MySQL version: (unknown)
Webserver: Apache (cgi-fcgi)
Host: (unknown)
Admin Tools version: (2.5.6)

Do you have any idea? Thank you very much in advance.

Best regards,
Jurian

nicholas
Akeeba Staff
Manager
Hi Jurian,

It does work. Try http://akeebabackup.com and you will see that the non-www to www redirection and the auto SSL redirection do take place. My setup is dead simple:
Global Configuration, Use SSL, Always
Admin Tools' .htaccess Maker, enabled the non-www to www redirection

From that point it's all down to Apache setup. If the server tries to redirect non-www to www you get an endless loop.

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!

Spark
Hi Nicholas,

It also works for my site and I'm using the same setup (dead simple, indeed). So it's an issue with Apache setup, beyond our control. Thanks for your view, I'll forward this to my customer.

Best regards,
Jurian

nicholas
Akeeba Staff
Manager
Yes, please forward my entire answer. Maybe their host is doing this kind of www to non www redirection in their vhost setup. I have seen it once in the past.

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!

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!