`www.me.com/page.php` 和 `www.me.com/page.php?1` 和 `www.me.com/page.php?2` 是否被视为 3 个唯一的 URI? [英] is `www.me.com/page.php` and `www.me.com/page.php?1` and `www.me.com/page.php?2` considered 3 unique URIs?
问题描述
来自页面 http://msdn.microsoft.com/en-us/magazine/dd315413.aspx:
用户代理与资源交互,资源是任何可以命名和表示的东西.每个资源都可以通过唯一的统一资源标识符 (URI) 进行寻址.
User agents interact with resources, and resources are anything that can be named and represented. Each resource can be addressed via a unique Uniform Resource Identifier (URI).
是 www.me.com/page.php
和 www.me.com/page.php?1
和 www.me.com/page.php?2
考虑了 3 个唯一的 URI 吗?
is www.me.com/page.php
and www.me.com/page.php?1
and www.me.com/page.php?2
considered 3 unique URIs ?
我知道它们被解释为不同的网址.但是它们在 RESTful 定义的意义上是唯一的吗:每个资源都通过唯一的 URI 访问
I know they are interpreted as different urls. But are they unique in the sense according to the RESTful definition: each resource is accessed through a unique URI
推荐答案
答案是它们是唯一的 URL,但不同的 URL 可以引用同一个实体:
The answer is they are unique URLs, but different URLs could refer to the same entity:
这篇文章可能有帮助:http://en.wikipedia.org/wiki/Uniform_Resource_Name
URL 是资源定位器,没有什么可以说它们必须指向不同的事物",它们通常会这样做,但并非总是如此.
URL's are resource locators, there is nothing to say they must point at different "things", they usually do, but not always.
URN 是唯一标识符,但同样,您可以让两个 URN 使用不同的 ID 指向同一本书
URN's are meant to be unique identifiers, but again, you could have two URNs pointing to the same book using different ID's
这篇关于`www.me.com/page.php` 和 `www.me.com/page.php?1` 和 `www.me.com/page.php?2` 是否被视为 3 个唯一的 URI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!