我一直在阅读关于$ ! ; . ,
是URL中“保留”字符的文章。但我找不到它们被保留的原因。
我已经阅读到$ ! ; . ,
这些字符在url中被“保留”。但是我无法找到它们被保留的原因。
/ path delimiter
: port
? query
& glue get params
= param=val
\# link anchor
+ space
我的具体问题:
有人知道 $ ! ; . , 有什么用吗?
请求 URI 中的 : 是否有特殊含义?
我一直在阅读关于$ ! ; . ,
是URL中“保留”字符的文章。但我找不到它们被保留的原因。
我已经阅读到$ ! ; . ,
这些字符在url中被“保留”。但是我无法找到它们被保留的原因。
/ path delimiter
: port
? query
& glue get params
= param=val
\# link anchor
+ space
我的具体问题:
有人知道 $ ! ; . , 有什么用吗?
请求 URI 中的 : 是否有特殊含义?
RFC 2396已经过时。
有关规范的现代版本,请参见:
是的,它用作路径部分的分隔符。
是的,它用作端口的前缀,但它还有其他角色,比如用户信息分隔符,以及主机指示符的IP样式的分隔符。
令人惊讶的是,=字符不是URL、URI或IRI语法的一部分。它只在http(s)协议中具有特殊含义。这与URL/IRI/URI无关。
+作为空格的替代符号不是URL/URI/IRI语法的一部分。它只是一些PHP程序为了获得漂亮的URL而方便地发明的。
它们在URL/URI/IRI语法中没有特殊含义。它们可以是子定界符生成式的一部分,可以在用户信息部分、未来IP部分、路径段或主机部分中使用。
google.com/search?q=test
- Kermit=
是子分隔符的一部分,+
也是。 - John SmithMany URI include components consisting of or delimited by, certain special characters. These characters are called "reserved", since their usage within the URI component is limited to their reserved purpose. If the data for a URI component would conflict with the reserved purpose, then the conflicting data must be escaped before forming the URI.
reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","
The "reserved" syntax class above refers to those characters that are allowed within a URI, but which may not be allowed within a particular component of the generic URI syntax; they are used as delimiters of the components described in Section 3.
Characters in the "reserved" set are not reserved in all contexts. The set of characters actually reserved within any given URI component is defined by that component. In general, a character is reserved if the semantics of the URI changes if the character is replaced with its escaped US-ASCII encoding.
$ ; . ,
这些符号有什么用? - CoR:
也有免费/特定应用程序的功能,对吧?当然,如果它用在请求URI中 :) - CoR