 |
 |
Why Do Some Pages Lack the "www." Prefix?
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status:
Offline
|
|
When you have a website whose top-level index page resolves fine with "http://www.mydomain.extension", why do some subpages resolve to "mydomain.extension" (i.e., without the preceding "www.")? I would prefer it to always be preceded by www. --- how do I make sure that happens?
I checked and all of my pages have the <base href="http://www.mydomain.extension" /> tag (inside of my <head></head> tag), so that is apparently not the problem.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
First off... the www in front of things is a convention. It is a leftover from the ancestry of the internet when the whole port system (such as port 80 for web pages) was still a bit new. At that point you would have ftp.somedomain.com for ftp traffic, www.somedomain.com for web, etc... and they would usually all resolve to the same machine.
Now people have come to expect it, so it is still there. It sounds like your DNS server (the one hosting the name) is properly set up so the both the root domain and the www subdomain point at the same place, but it might be that the apache.conf reference for your site gives the root domain as the canocial name, so every time it is redirected it goes there. You just have to change that... but this is not really an issue, it is just your personal preference.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status:
Offline
|
|
Originally posted by larkost:
but this is not really an issue, it is just your personal preference.
Exactly. So I guess I have to find my apache.conf file, eh? Maybe it's in a directory above my public_html/ folder....
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2000
Status:
Offline
|
|
Originally posted by selowitch:
When you have a website whose top-level index page resolves fine with "http://www.mydomain.extension", why do some subpages resolve to "mydomain.extension" (i.e., without the preceding "www.")? I would prefer it to always be preceded by www. --- how do I make sure that happens?
Since the DNS is setup properly (since you get content from both), you'll need to configure the server itself to do that. Usually a mod_rewrite directive can be used (that's what I do usually), but there may be other methods.
It might also be that your server is currently setup to redirect anything coming from port 80 to http://yourdomain.ext
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|