Support

Admin Tools

#9747 Forwarding "www.site" to "site"

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 Monday, 31 January 2011 07:41 CST

Randy Prue
I put up a site (example, site.com) and it works just fine.

My customer used www.site.com and it appears that the template does not load. The content is there but the design/layout template is not.

I am looking at "URL Redirection" right now, but I think this is NOT what I need.

I think this is a fairly simple straightforward option. I just don't remember where it is (options at the registrar or the host?).

The site is live. The customer is upset. Can anyone point me to a quick way to fix this?

BTW, in URL Redirection, it says "Use the Add button" ... but there is no "Add" button (there is a "New" button).

slaes
randy why would you forward www to non www? what you should do is forward all to www. Also make sure the site location in the bottom of the htacess make matches www.yourdomain.com/

Also the reason the template is not appearing is because the configuration.php or whatever cms ur using does not match what your asking htaccess make to do. Go into this faile and make sure live_site 'www.yourdomain.com' is correct. Thats all

Randy Prue
Thank you, Slaes.

Right now, www. does not work, so I am DEFINITELY not going to direct the one that works to the one that does not.

Unfortunately, I do not understand the rest of what you are saying about htaccess and configuration.php, but I will go have a look and see what I can find.

P.S. www. is obsolete and I never use it. I will not encourage anyone to use it. It is a relic of the past.

Randy Prue
Well, that is it!

I used Admin Tools Pro (htaccess maker) and turned on www. redirect to non www. Bingo. I have a few other sites to do this to (one seems to work in the www. incarnation only).

slaes
if www is not working you need to check the dns and other domain names settings with you domain name provider, this is probably your problem re the www.

the reason your template is not loading css and etc is simple because you htaccess file is not configured correctly with your site. Your cms should have a configuration.php file with a variable called live site, make sure this matches the information you putting into you htaccess file for the site location. If i were you i would fix the www issue as a matter of urgency start with your domain name settings, if they are correct, its definately an issue with your cms configuration live site, what cms are you using? If that correct then simple change htaccess maker to non www to www and all will be perfect!

Randy Prue
Thanks again, Slaes. I will check later with the registrar (domain name provider). I have 24-hour support with them.

CMS is Joomla.

In configuration.php, live site = '' (two single quotes, or blank).

I see nothing in htaccess that refers to the site location.

slaes
sweet, check you dns and domain name settings. Make sure they all point to your server properly.

If everything is good at the domain name end, i would recommend they following as its a correct and proper config.

start with your htaccess file (maker) : (if you nervous about this make a copy of your excisting htaccess file which you can easily always go back to.

- Optimisation and utility - redirect non www to www
- System configuration - MAKE sure you site shows as www.site.com (no dash, backet, http etc)

- Go into your configuration.php file and make sure shows at follows. var $live_site = 'www.yousite.com'; (no / at end or anything like that)

If you followed everything properly, site will work for both www and divert to to www, no css issues etc. This is proper setup.

If your copying joomla installs from directories, addon domains and etc, you need to know this stuff otherwise you will have endless issues. If you know hot to fix, its only few minutes.

nicholas
Akeeba Staff
Manager
Exactly. That's the correct approach to solve this issue. You might also want to disable the "Anti-leech protection for static resources outside images/stories" option in the .htaccess Maker's "Server Protection" pane, then click on "Save and create .htaccess". This will make sure that static resources, like images, CSS and Javascript files, will be served by both the www and non-www domains.

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!

Randy Prue
Thanks again to both of you. When I add 'site.com' to the configuration.php file (var $live_site = ) the template immediately ceases to load.

Remember that I am forwarding from www. to non-www.

Also, oddly, in this state, when I load Admin Tools Professional 1.2.2, it displays the text twice for each item of Security and Tools (but does not display the icons). To me this means that it is displaying the text and that alt text at the same time as it is not loading the images for the template.

By leaving the live site variable blank, all goes back to working (and with www. forwarding to the stripped version). I will have to go get help from the registrar and the host about the IP and DNS settings, see whether they are working okay.

Randy Prue
Uh, oh. New problem. My backup was 9.4 MB a few days ago. Now it is 18.8 MB. I am thinking that I have duplicates of all pages and the possible google "sin" that goes along with that.

nicholas
Akeeba Staff
Manager
The $live_site variable should be http://site.com. You forgot that first part, that's why the site stopped working. The backup size is not affected by this variable. Maybe you have uploaded some more content, e.g. images, audio files, etc?

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!