Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does a URI include the protocol?

Will the URI of this URL, for example http://news.bbc.co.uk/sport include http:// at the front, making the URI http://news.bbc.co.uk ?

Or, is the URI just news.bbc.co.uk ?

like image 315
Rob Avatar asked Mar 28 '11 18:03

Rob


People also ask

What does a URI consist of?

A complete URI consists of a naming scheme specifier followed by a string whose format is a function of the naming scheme. For locators of information on the Internet, a common syntax is used for the IP address part.

Does URI include http?

The URI Scheme (http, ftp, file et. c.) is part of the uri.

What is difference between URI and URL?

URL and URI, both crucial concepts of the web, are terms that are often interchanged and used. However, they are not the same. The URI can represent both the URL and the URN of a resource, simultaneously, while URL can only specify the address of the resource on the internet.

What are the 5 parts of a URL?

What are the parts of a URL? A URL consists of five parts: the scheme, subdomain, top-level domain, second-level domain, and subdirectory.


2 Answers

A URI per RFC 3986 has the grammar:

URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

So, yes, the scheme http as well as the separating : and the // prefix of the hier-part are part of the URI. news.bbc.co.uk is only the host.

like image 177
Gumbo Avatar answered Oct 05 '22 14:10

Gumbo


The URI Scheme (http, ftp, file et.c.) is part of the uri.

like image 41
Anders Lindahl Avatar answered Oct 05 '22 13:10

Anders Lindahl