Rob
Rob

Reputation: 71

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 ?

Upvotes: 7

Views: 3681

Answers (2)

Anders Lindahl
Anders Lindahl

Reputation: 42870

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

Upvotes: 2

Gumbo
Gumbo

Reputation: 655239

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.

Upvotes: 11

Related Questions