PDA

View Full Version : What's the Difference Between <mysite.us> and <www.mysite.us>??



skeezix
10-21-2009, 10:23 PM
With one exception, it doesn't seem to make any difference if I type "www." in front of a domain name or if I just type the domain name without the "www.". The page I receive in both cases is identical.

EXCEPT:

When I navigate to www.hoaservices.us (http://www.hoaservices.us), I see the logo graphic in the home page banner and the tabs have labels. That's how I designed the site.

But when I leave out the "www.", the same page is served but the logo graphic and the tab labels are missing. I'm at a loss as to why. Can somebody please point me in the right direction?

MrDelish
10-22-2009, 12:24 PM
For many basic sites running on HTML, there is no difference. However, when you're using a PHP application such as Joomla or Wordpress, the site definitions in the database can cause formatting to go loopy on alternate addresses that lead to the same files. Since these addresses can be considered as separate and distinct by search engines, you will probably want to use the following code to send all requests to the www address:


RewriteEngine On
RewriteCond %{HTTP_HOST} ^DOMAIN.com
RewriteRule (.*) http://www.DOMAIN.com/$1 [R=301,L]

felgall
10-22-2009, 03:01 PM
or put the www. on the other line to redirect all traffic to the page without the www. on the front.

skeezix
10-22-2009, 09:00 PM
RewriteEngine On
RewriteCond %{HTTP_HOST} ^DOMAIN.com
RewriteRule (.*) http://www.DOMAIN.com/$1 [R=301,L]

That worked fine for the website in question. I put that code in that website folder's htaccess file and it solved the problem.

However, I can't find an htaccess file in the other websites' folders. The other websites are WP-driven, and the website in question is Joomla driven.

It's been awhile since I've had to muck around in the bowels of my websites.

felgall
10-22-2009, 09:55 PM
WordPress has an option on one of the admin screens where you set up both where the blog is actually located and what address to show. I think it sets the appropriate redirect headers inside the script itself if you enter the wrong variant as long as you enter one that actually finds the page.

MrDelish
10-23-2009, 10:02 AM
WordPress has an option on one of the admin screens where you set up both where the blog is actually located and what address to show. I think it sets the appropriate redirect headers inside the script itself if you enter the wrong variant as long as you enter one that actually finds the page.

Yep: WP Dashboard -> Settings -> General -> "Wordpress address" and "Blog address".

skeezix
10-25-2009, 07:20 PM
WordPress has an option on one of the admin screens...

You have been, as always, a big help, and now my problem is solved!