| 
	
 | 
 Posted by Alan J. Flavell on 06/12/90 11:41 
On Fri, 3 Mar 2006, xyZed wrote: 
 
> www.widget.com 
>  
> www.widget.com/ 
>  
> Which one is right and what's the difference? (please) 
 
You talking about URLs published on the WWW?  If so then both are  
wrong, unless they're meant to be resolved as relative URLs[1] 
 
If you meant http://www.widget.com versus http://www.widget.com/ then  
both are correct.  The "/" which separates the host part of the URL  
from the local part of the URL is optional when the local part is  
empty. 
 
Don't confuse that with the trailing slash on, let's say, 
http://foo.example/bar versus http://foo.example/bar/ 
 
Those are two distinct URLs, either or both of which *could* refer to  
distinct resource(s) at the server.  Which one(s) are correct depends  
on your server configuration. 
 
What did you *really* want to know?  If you're referring to the sloppy  
habit of typing incomplete URLs into your browser's URL bar, then the  
rules are whatever the browser developer has implemented, since *that*  
would be of purely local significance. 
 
have fun 
 
[1] in which case they'd be resolved relative to the absolute URL of  
the page which referenced them, let's say  
http://www.foo.example/some/path/to/www.widget.com , with or  
without a trailing slash.
 
  
Navigation:
[Reply to this message] 
 |