2

http://example.com/test/test/coffee.html <- this is called a URL

/test1/test2/ <- this called a path

In this context, what would be a proper expression for a part of that path, such as test2?

  • 1
    I am not aware of an established name. The relevant Wikipedia article uses path component. In XPath (which is not about URLs, but uses a similar syntax), they are called location steps. – michael.hor257k Apr 3 '17 at 14:54
10

It's called the path segment.

See: https://tools.ietf.org/html/rfc2396#section-3.3

The path may consist of a sequence of path segments separated by a single slash "/" character.

0

A URL (Uniform Resource Locator) is used to uniquely identify a resource over the web. URL has the following syntax:

protocol://hostname:port/path/filename

So, URL consists of 4 parts. The path, in fact, is nothing more than a relative directory. In your example, test2 may either refer to a directory that has an index file or a file name changed by using URL rewrite function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.