Open this PHP file:
yourdomain.com/configuration.php
and make sure this field is blank:
So, your Joomla will decide its live_site by itself.
If this line is already blank, then there is one thing left:
Make that line as this:
public $live_site = 'www.yourdomain.com';
and re-direct
non-www to
www by adding the below lines to .htaccess
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
So,
1- http:// yourdomain.com will be redirected to http://
www.yourdomain.com
2- https:// yourdomain.com will be redirected to https://
www.yourdomain.com
(we are using the same .htaccess lines in flexiblewebdesign.com as well, try to access
flexiblewebdesign.com and you will be redirected to
www.flexiblewebdesign.com)
Alternative ways:
stackoverflow.com/questions/1157255/how-to-redirect-non-www-to-www-urls-using-htaccess
Regards,
Support