3 ms·
They are both retrieved because the server handles it. Of course you can leave the path empty. From the RFC: > path = path-abempty ; begins with "/
by chrismcb 9y ago
They are both retrieved because the server handles it.
Of course you can leave the path empty.
From the RFC:
> path = path-abempty ; begins with "/" or is empty
A better way to look at it is how w3.org defines it:
> h t t p : / / hostport [ / path ] [ ? search ]
> path : Void | segment [ / path ]
Notice how the slash is in the optional part.
- JoshMnem 9y agoI've never seen a site that doesn't serve a root path. You can't serve a homepage at http://example.comindex.html http://example.comindex.html. I'd be curious to see if it's possible to serve one at http://example.com?page=home http://example.com?page=home, http://example.com#home http://example.com#home, or something like that though. In any case, http://www.tesla.com http://www.tesla.com is not the URL of their home page -- it's http://www.tesla.com/ http://www.tesla.com/ even though the browser tries to tell you that you're visiting http://www.tesla.com http://www.tesla.com.