绝对路径以两个斜杠开头 [英] Absolute Paths beginning with two slashes
问题描述
我注意到指向不同Wikipedia子域上路径的Wikipedia链接使用具有以下语法的链接://<SERVER_NAME>/<REQUEST_URI>
.例如,从文件页面到解决方案
这些//example.com
URI看起来像方案相对"或协议相对",并且在此问题上有更多关于此的信息:>
显然,这实际上可以称为网络路径参考",如下所示: http://tools.ietf.org/html/rfc3986#section-4.2
报价:
以两个斜杠字符开头的相对引用称为 网络路径参考;这种参考很少使用.一种 以单个斜杠字符开头的相对引用是 称为绝对路径参考.一个相对的参考 不是以斜杠字符开头的称为相对路径引用.
I noticed that Wikipedia links pointing to a path on a different Wikipedia subdomain use a link with the following syntax: //<SERVER_NAME>/<REQUEST_URI>
. For example, a link from a file page to the file appears (for example) as //upload.wikimedia.org/wikipedia/en/9/95/Stack_Overflow_website_logo.png
. I am familiar with absolute paths (thinking twice about that now) and relative paths and how to use them. However, I have never seen this use. I assume this points to a new server name using the current protocol. Is this correct? And is there an official name (or widely accepted name) for this?
It looks like these //example.com
URIs are called "Scheme Relative" or "Protocol Relative", and there is more information about it at this question:
Network-Path Reference URI / Scheme relative URLs
EDIT:
Apparently this might actually be called a "network-path reference" as seen here: http://tools.ietf.org/html/rfc3986#section-4.2
Quote:
A relative reference that begins with two slash characters is termed a network-path reference; such references are rarely used. A relative reference that begins with a single slash character is termed an absolute-path reference. A relative reference that does not begin with a slash character is termed a relative-path reference.
这篇关于绝对路径以两个斜杠开头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!