The difference between URI and URL
This question has been asked many times before. But before you down-vote this please allow me to ask it in a slightly different way:
Of the following examples, which are URLs, which are URIs and which are both:
1. www.example.com
2. //www.example.com
3. http://www.example.com
4. www.example.com/myfolder/mypage.html
5. //www.example.com/myfolder/mypage.html
6. http://www.example.com/myfolder/mypage.html
7. myfolder/mypage.html
8. /myfolder/mypage.html
9. mypage.html
Any comment on which are URNs would also be welcome.
I really think What is the difference between URI, URL and URN? should clarify your question. However, I'll try to answer your question directly..
www.example.com
none
//www.example.com
none
http://www.example.com
URL and URI
www.example.com/myfolder/mypage.html
none
//www.example.com/myfolder/mypage.html
none
http://www.example.com/myfolder/mypage.html
URL and URI
myfolder/mypage.html
none
/myfolder/mypage.html
none
mypage.html
none
Hope that helps a little.
链接地址: http://www.djcxy.com/p/70456.html上一篇: 什么是一个URI看起来不是一个名字?
下一篇: URI和URL之间的区别