| View previous topic :: View next topic |
| Author |
Message |
Jeff Liebermann Guest
|
Posted: Mon Jul 28, 2008 7:02 am Post subject: Re: www Needed in URL? |
|
|
On Mon, 28 Jul 2008 01:34:20 +0000, Guy Macon
<http://www.GuyMacon.com/> wrote:
[quote]Jeff Liebermann wrote:
www.microsoft.com is a FQDN (fully qualified domain name). The three
parts shown are:
com The TLD (top level domain).
microsoft The domain.
www The server, hose, or machine.
In order to specify a FQDN, you need all three.
I believe that this is incorrect, but am open to the
possibility that my understanding is incorrect.
[/quote]
I had to dig out my copy of O>Reilly "DNS and BIND"[1] to see if it is
possible to setup a DNS record with just microsoft.com. Apparently,
you can, but you get to point to exactly one IP address. You can
alias the IP to other domain names, but not to other IP>s. Not very
useful if you have multiple servers using that domain. Therefore,
methinks a FQDN should include the server/host/machine name. Wikipedia
agrees:
<http://en.wikipedia.org/wiki/FQDN>
[1] I just discovered I have 4 different editions of DNS and BIND. No
wonder there>s no more room on the bookshelves.
Disclaimer: I are not a DNS expert (despite the pile of books).
[quote]Here is my understanding:
A fully qualified domain name is any domain name that unambiguously
specifies an exact location in DNS tree.
[/quote]
Agreed. The corollary is also true. If the name is ambiguous, it>s
not a FQDN.
[quote]A FQDN can be at any level,
but no TLDs that are FQDNs exist.
[/quote]
Well yes. If there>s any possibility of ambiguity, it>s not a FQDN.
As soon as you only specify only the domain, you run the risk of
ambiguity.
[quote]Partially qualified domain names
only specify a portion of a domain name, and further interpretation
must be done to fully identify the node.
[/quote]
Yep. If furthur interpetation is required, it>s ambiguous.
[quote]Within DNS master files, FQDNs end with a dot, while PQDNs do not.
If the DNS master file lists [ example.com ] and [ www.example.com. ],
then www.example.com is a FQDN and example.com is a PQDN. If the
DNS master file lists [ example.com. ] then example.com is a FQDN.
[/quote]
Yeah, but defacto practice and convention have it that URL>s do NOT
end in a dot. If you>re using dig, nslookup, DNSlint, or other tools,
you need to pay attention to the trailing dot. For generic web
surfing, the ending dot is never used.
<http://en.wikipedia.org/wiki/FQDN>
"In practice, the trailing dot is almost always omitted in
everyday applications, making such domain references
technically ambiguous."
Incidentally, SNMP OID>s have the same problem. They should all start
with a dot, but rarely do so.
--
Jeff Liebermann jeffl@cruzio.com
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann AE6KS 831-336-2558 |
|
| |
|
Back to top |
mpm Guest
|
Posted: Thu Jul 31, 2008 1:55 am Post subject: Re: www Needed in URL? |
|
|
On Jul 27, 11:16�pm, Guy Macon <http://www.GuyMacon.com/> wrote:
[quote]mpm wrote:
So, in all liklihood, all these guys jumping around claiming they
don>t need the 'www" (for whatever benefit they see in that? - which
to me is none), are just "lucky" that their particular DNS happens to
have both URL formats (with and without www) pointing to the same
server.
I write my own DNS records and have cmplete control of the
nameservers for my domain. �Any serious web developer will
do the same.
--
Guy Macon
http://www.GuyMacon.com/
[/quote]
I agree that would make life easier.
I just finished a project where I had to connect with a SQL database
hosted on 1and1.com
Visual Studio can>t administer the database directly due to host
restrictions.
So you have to do a lot of connection strings behind the scenes.
Incidentally, when I mentioned previously that I always try to use
complete URL>s in code, I guess that>s mainly because the stuff I
undertake as projects hardly ever gets moved around. I>ll set some
global variables to store the URL(s), but that variable will be the
complete domain and path. For what I do, I just don>t see the
benefit to local addressing. (But I>m sure there>s a reason for it.)
Actually I take that back. Some of the stuff I do in JavaScript will
use relative addressing, but that>s all client-side stuff, not web per
se.
-mpm |
|
| |
|
Back to top |
JosephKK Guest
|
Posted: Thu Jul 31, 2008 5:57 am Post subject: Re: www Needed in URL? |
|
|
On Sun, 27 Jul 2008 17:13:54 -0700 (PDT), mpm <mpmillard@aol.com>
wrote:
[quote]On Jul 27, 6:37?pm, Jeff Liebermann <je...@cruzio.com> wrote:
Thanks Jeff.
That explains it.
So, in all liklihood, all these guys jumping around claiming they
don>t need the 'www" (for whatever benefit they see in that? - which
to me is none), are just "lucky" that their particular DNS happens to
have both URL formats (with and without www) pointing to the same
server.
Your explaination also answers another question I had, but did ask:
And that was along the lines of subdomains, such as www.xyz.microsoft.com
-mpm
[/quote]
Actually, likely as not, the browser adds the "www." itself. |
|
| |
|
Back to top |
Guy Macon Guest
|
Posted: Thu Jul 31, 2008 7:06 am Post subject: Re: www Needed in URL? |
|
|
mpm wrote:
[quote]Incidentally, when I mentioned previously that I always try to use
complete URL>s in code, I guess that>s mainly because the stuff I
undertake as projects hardly ever gets moved around. I>ll set some
global variables to store the URL(s), but that variable will be the
complete domain and path. For what I do, I just don>t see the
benefit to local addressing. (But I>m sure there>s a reason for it.)
[/quote]
The reason usually given is the ability to move pages to different
directories or to different servers without changing the URLs.
In my opinion, that just means that they don>t have a good search
and replace that works on multiple files at once.
--
Guy Macon
<http://www.GuyMacon.com/> |
|
| |
|
Back to top |
mpm Guest
|
Posted: Thu Jul 31, 2008 6:27 pm Post subject: Re: www Needed in URL? |
|
|
On Jul 31, 12:28�pm, Rich Grise <r...@example.net> wrote:
[quote]On Thu, 31 Jul 2008 02:31:48 +0000, Guy Macon wrote:
mpm wrote:
Incidentally, when I mentioned previously that I always try to use
complete URL>s in code, I guess that>s mainly because the stuff I
undertake as projects hardly ever gets moved around. �I>ll set some
global variables to store the URL(s), but that variable will be the
complete domain and path. � For what I do, I just don>t see the benefit
to local addressing. �(But I>m sure there>s a reason for it.)
The reason usually given is the ability to move pages to different
directories or to different servers without changing the URLs. In my
opinion, that just means that they don>t have a good search and replace
that works on multiple files at once.
I thought it was so that you>d only have to change one thing - hard-coding
absolute links makes as much sense as hard-coding numerical constants, in
my no so humble opinion. ;-)
Cheers!
Rich
[/quote]
Well, here>s the thing:
If you hard code the complete URL, and that file exists on the URL,
you never get a busted link. |
|
| |
|
Back to top |
Rich Grise Guest
|
Posted: Thu Jul 31, 2008 10:28 pm Post subject: Re: www Needed in URL? |
|
|
On Thu, 31 Jul 2008 02:31:48 +0000, Guy Macon wrote:
[quote]mpm wrote:
Incidentally, when I mentioned previously that I always try to use
complete URL>s in code, I guess that>s mainly because the stuff I
undertake as projects hardly ever gets moved around. I>ll set some
global variables to store the URL(s), but that variable will be the
complete domain and path. For what I do, I just don>t see the benefit
to local addressing. (But I>m sure there>s a reason for it.)
The reason usually given is the ability to move pages to different
directories or to different servers without changing the URLs. In my
opinion, that just means that they don>t have a good search and replace
that works on multiple files at once.
[/quote]
I thought it was so that you>d only have to change one thing - hard-coding
absolute links makes as much sense as hard-coding numerical constants, in
my no so humble opinion. ;-)
Cheers!
Rich |
|
| |
|
Back to top |
Michael A. Terrell Guest
|
Posted: Thu Jul 31, 2008 11:50 pm Post subject: Re: www Needed in URL? |
|
|
mpm wrote:
[quote]
On Jul 31, 12:28�pm, Rich Grise <r...@example.net> wrote:
On Thu, 31 Jul 2008 02:31:48 +0000, Guy Macon wrote:
mpm wrote:
Incidentally, when I mentioned previously that I always try to use
complete URL>s in code, I guess that>s mainly because the stuff I
undertake as projects hardly ever gets moved around. �I>ll set some
global variables to store the URL(s), but that variable will be the
complete domain and path. � For what I do, I just don>t see the benefit
to local addressing. �(But I>m sure there>s a reason for it.)
The reason usually given is the ability to move pages to different
directories or to different servers without changing the URLs. In my
opinion, that just means that they don>t have a good search and replace
that works on multiple files at once.
I thought it was so that you>d only have to change one thing - hard-coding
absolute links makes as much sense as hard-coding numerical constants, in
my no so humble opinion. ;-)
Cheers!
Rich
Well, here>s the thing:
If you hard code the complete URL, and that file exists on the URL,
you never get a busted link.
[/quote]
On the other hand, you can have a complete, working copy of your
website on a local computer without changing the links. Some of the
sites I maintain are mirrored, so all the links are local to the site.
That way, I simply FTP any new or changed pages to the individual
servers, but only after testing them on a local PC. The only visible
difference between the mirrored & main site is the domain name, and
E-mail address for each version. When a site reaches hundreds of pages,
it makes life easier.
Some friends of mine had to move their website, after the current host
had a server crash. The host>s newest backup was bad, and what they
restored was parts of four older versions. They didn>t keep a copy on
their hard drive, 'to save space', so the entire site was lost. If they
had kept it the way I told them, it would have taken 15 minutes to move
to the new host & servers.
--
http://improve-usenet.org/index.html
If you have broadband, your ISP may have a NNTP news server included in
your account: http://www.usenettools.net/ISP.htm
Sporadic E is the Earth>s aluminum foil beanie for the 'global warming'
sheep. |
|
| |
|
Back to top |
mpm Guest
|
Posted: Fri Aug 01, 2008 1:04 am Post subject: Re: www Needed in URL? |
|
|
On Jul 31, 6:53�pm, Guy Macon <http://www.GuyMacon.com/> wrote:
[quote]Rich Grise wrote:
Guy Macon <http://www.GuyMacon.com/> wrote:
mpm wrote:
If you hard code the complete URL, and that file exists on the URL, you
never get a busted link.
Also, if you move that file and always use complete URLs, the URL is a
unique string that points to that file and no other, making a global
search and replace across multiple files simple to do.
Maybe I was thinking of the pathological case (imagine your surprise! ;-)
where you move one file, then have to modify half-a-dozen other files to
point to its new home. That way, you only have one thing per file to
change, like <base href> or something like that.
True, but I also only have one thing to change -- all instances ofhttp://foo.www.example.com/foo.htmtohttp://bar.www.example.org/bar.html
in multiple files. �Done in an eyeblink.
I have been trying to think of a realy pathological case where
it takes more than an extra second or so to change all the full
URLs. I can>t think of one.
--
Guy Macon
http://www.GuyMacon.com/>- Hide quoted text -
- Show quoted text -
[/quote]
I can think of one really good reason NOT to use relative paths:
ASP.NET won>t touch an HTML tag, such as <img>, or <a>.
If you place a master page (the dot-net equivalent of a cascading
style sheet) in a different directory from the content page, you can
end up with busted links that dot-NET can>t catch at design-time. You
could mark the URL relative to the content page, but that just limits
where you can place the master page, so same difference.
You could turn the <img> tags into server-side controls, in which case
ASP can detect and correct the errors. But that seems awfully
complicated to me, and not worth the effort.
I would just do a global search & replace.
-mpm |
|
| |
|
Back to top |
Guy Macon Guest
|
Posted: Fri Aug 01, 2008 1:12 am Post subject: Re: www Needed in URL? |
|
|
Rich Grise wrote:
[quote]
On Thu, 31 Jul 2008 02:31:48 +0000, Guy Macon wrote:
mpm wrote:
Incidentally, when I mentioned previously that I always try to use
complete URL>s in code, I guess that>s mainly because the stuff I
undertake as projects hardly ever gets moved around. I>ll set some
global variables to store the URL(s), but that variable will be the
complete domain and path. For what I do, I just don>t see the benefit
to local addressing. (But I>m sure there>s a reason for it.)
The reason usually given is the ability to move pages to different
directories or to different servers without changing the URLs. In my
opinion, that just means that they don>t have a good search and replace
that works on multiple files at once.
I thought it was so that you>d only have to change one thing - hard-coding
absolute links makes as much sense as hard-coding numerical constants, in
my no so humble opinion. ;-)
[/quote]
The reason to avoid hard coding numerical constants isn>t so that you
only have to change one thing -- we have computers that can change
many things in an eyblink -- but rather to give them names that make
sense (Using DaysPerWeek rather than 7, for example, is a lot easier
to follow [and the number of days in a week are not likely to change!])
and thus make the code more readable. That doesn>t apply to URLs. the
other reason is to differentiate a 7 that is the number of days in a
week in one place from a 7 that is a manager>s IQ in another place.
That also doesn>t apply to URLs.
--
Guy Macon
<http://www.GuyMacon.com/> |
|
| |
|
Back to top |
Guy Macon Guest
|
Posted: Fri Aug 01, 2008 1:16 am Post subject: Re: www Needed in URL? |
|
|
mpm wrote:
[quote]If you hard code the complete URL, and that file exists on the URL,
you never get a busted link.
[/quote]
Also, if you move that file and alsways use complete URLs, the URL
is a unique string that points to that file and no other, making
a global search and replace across multiple files simple to do.
--
Guy Macon
<http://www.GuyMacon.com/> |
|
| |
|
Back to top |
Guy Macon Guest
|
Posted: Fri Aug 01, 2008 1:20 am Post subject: Re: www Needed in URL? |
|
|
Content-Transfer-Encoding: 8Bit
Michael A. Terrell wrote:
[quote]
mpm wrote:
Rich Grise wrote:
Guy Macon <http://www.GuyMacon.com/> wrote:
mpm wrote:
Incidentally, when I mentioned previously that I always try to use
complete URL>s in code, I guess that>s mainly because the stuff I
undertake as projects hardly ever gets moved around. �I>ll set some
global variables to store the URL(s), but that variable will be the
complete domain and path. � For what I do, I just don>t see the benefit
to local addressing. �(But I>m sure there>s a reason for it.)
The reason usually given is the ability to move pages to different
directories or to different servers without changing the URLs. In my
opinion, that just means that they don>t have a good search and replace
that works on multiple files at once.
I thought it was so that you>d only have to change one thing - hard-coding
absolute links makes as much sense as hard-coding numerical constants, in
my no so humble opinion. ;-)
Well, here>s the thing:
If you hard code the complete URL, and that file exists on the URL,
you never get a busted link.
On the other hand, you can have a complete, working copy of your
website on a local computer without changing the links. Some of the
sites I maintain are mirrored, so all the links are local to the site.
That way, I simply FTP any new or changed pages to the individual
servers, but only after testing them on a local PC. The only visible
difference between the mirrored & main site is the domain name, and
E-mail address for each version. When a site reaches hundreds of pages,
it makes life easier.
[/quote]
Slightly easier, but not much. Global search and replace in all
files in a directory including subdirectories handles the case of
having a local copy just fine.
[quote]Some friends of mine had to move their website, after the current host
had a server crash. The host>s newest backup was bad, and what they
restored was parts of four older versions. They didn>t keep a copy on
their hard drive, 'to save space', so the entire site was lost. If they
had kept it the way I told them, it would have taken 15 minutes to move
to the new host & servers.
[/quote]
That>s a backup issue, not a partial vs. complete URL issue.
--
Guy Macon
<http://www.GuyMacon.com/> |
|
| |
|
Back to top |
Rich Grise Guest
|
Posted: Fri Aug 01, 2008 1:28 am Post subject: Re: www Needed in URL? |
|
|
On Thu, 31 Jul 2008 20:16:12 +0000, Guy Macon wrote:
[quote]mpm wrote:
If you hard code the complete URL, and that file exists on the URL, you
never get a busted link.
Also, if you move that file and alsways use complete URLs, the URL is a
unique string that points to that file and no other, making a global
search and replace across multiple files simple to do.
[/quote]
Maybe I was thinking of the pathological case (imagine your surprise! ;-)
where you move one file, then have to modify half-a-dozen other files to
point to its new home. That way, you only have one thing per file to
change, like <base href> or something like that.
But, I must admit, I>ve been working on my client>s website, and I have
a WHOLE BUNCH of hard-coded URLs that point to stuff that doesn>t change,
notably, the example.net/images directory, so I guess I>m guilty of doing
what I just said you shouldn>t do. But the _target_ doesn>t move, just the
file that>s referring to them.
That>s different! [1]
Never Mind.
Cheers!
Rich
[1] Apologies to Emily Litella. ;-) |
|
| |
|
Back to top |
Guy Macon Guest
|
Posted: Fri Aug 01, 2008 3:53 am Post subject: Re: www Needed in URL? |
|
|
Rich Grise wrote:
[quote]
Guy Macon <http://www.GuyMacon.com/> wrote:
mpm wrote:
If you hard code the complete URL, and that file exists on the URL, you
never get a busted link.
Also, if you move that file and always use complete URLs, the URL is a
unique string that points to that file and no other, making a global
search and replace across multiple files simple to do.
Maybe I was thinking of the pathological case (imagine your surprise! ;-)
where you move one file, then have to modify half-a-dozen other files to
point to its new home. That way, you only have one thing per file to
change, like <base href> or something like that.
[/quote]
True, but I also only have one thing to change -- all instances of
http://foo.www.example.com/foo.htm to http://bar.www.example.org/bar.html
in multiple files. Done in an eyeblink.
I have been trying to think of a realy pathological case where
it takes more than an extra second or so to change all the full
URLs. I can>t think of one.
--
Guy Macon
<http://www.GuyMacon.com/> |
|
| |
|
Back to top |
JosephKK Guest
|
Posted: Fri Aug 01, 2008 7:05 am Post subject: Re: www Needed in URL? |
|
|
On Thu, 31 Jul 2008 22:53:51 +0000, Guy Macon
<http://www.GuyMacon.com/> wrote:
[quote]
Rich Grise wrote:
Guy Macon <http://www.GuyMacon.com/> wrote:
mpm wrote:
If you hard code the complete URL, and that file exists on the URL, you
never get a busted link.
Also, if you move that file and always use complete URLs, the URL is a
unique string that points to that file and no other, making a global
search and replace across multiple files simple to do.
Maybe I was thinking of the pathological case (imagine your surprise! ;-)
where you move one file, then have to modify half-a-dozen other files to
point to its new home. That way, you only have one thing per file to
change, like <base href> or something like that.
True, but I also only have one thing to change -- all instances of
http://foo.www.example.com/foo.htm to http://bar.www.example.org/bar.html
in multiple files. Done in an eyeblink.
I have been trying to think of a realy pathological case where
it takes more than an extra second or so to change all the full
URLs. I can>t think of one.
[/quote]
The pathological cases i have seen come refactoring code where you
need selective (by file) global replaces. Often for interim states. |
|
| |
|
Back to top |
|