문제

The term I'm looking for would be able to describe both users and 123:

http://example.com:8080/users/123?name=john#hohohohoho
\__/   \______________/\________/ \_______/ \________/
scheme    authority       path      query    fragment
도움이 되었습니까?

해결책

Not a very comprehensive answer however - the RFC specs seem to favour: "path component", "path segment"

from "Uniform Resource Identifier (URI): Generic Syntax"

3.3. Path

... A path consists of a sequence of path segments separated by a slash ("/") character. A path is always defined for a URI, though the defined path may be empty (zero length). ...

i would leave path component for the whole path

다른 팁

Ignoring RFC, the example of url you provided suggests that users in that case is some kind of param name and 123 is somewhat param value. Also in this particular url, the users could mean a controller name.

PHP based class routers often offer something like this...

/:module/:controller/:action

...default route. When user type this url:

/blog/category/show

...application will assign:

module = blog
controller = category
action = show

Take a look on: http://framework.zend.com/manual/1.12/en/zend.controller.router.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top