URL格式有一个有趣的事情:
URL的路径段中的参数。URL的路径段中的参数
欲了解更多信息,请参见 “2.2.5” 在
“奥赖利 - HTTP - 权威指南”。
or in official specification https://www.ietf.org/rfc/rfc2396.txt section 3.3。
这本书可以在互联网上免费找到。
让我们考虑以下网址:
http://www.example.com/first-segment/second-segment/index.html?type=HelloWorld
这里/first-segment/second-segment/index.html
是URL的路径部分。
- 而
first-segment
是路径 second-segment
的第一段是路径index.html
的第二段该路径的第三段
正是在这本书指出,每个段可以具有用分号“;”分隔的单个参数。在我们的例子则可能是:
http://www.example.com/first-segment;f1=WWW/second-segment;s1=1;s2=2/index.html;i1=100;abc=200?type=HelloWorld
- 这里
f1
- 参数first-segment
s1
和s2
- 参数second-segment
i1
和abc
参数index.html
的问题是:你知道任何实际的例子吗? URL中的这些参数?