Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
没有协议的URL是否有名称?_Url_Uri_Naming Conventions_Naming - Fatal编程技术网

没有协议的URL是否有名称?

没有协议的URL是否有名称?,url,uri,naming-conventions,naming,Url,Uri,Naming Conventions,Naming,一个简单的URL通常会有protocol://host:port: 但如果我省略了协议: 本地主机:8080 它仍然是一个URL还是有不同的名称 我知道存在协议相关URL,这也是它们的一种情况吗?localhost:8080不能是a,因为它们必须以/开头(在这种情况下,它将是网络路径引用,通常称为协议相关引用),而/,或者使用不包含:的路径段 (对于后一种情况,可以使用/localhost:8080) localhost:8080作为http://localhost:8080 在URIhttp

一个简单的URL通常会有
protocol://host:port

但如果我省略了协议:

本地主机:8080

它仍然是一个URL还是有不同的名称


我知道存在协议相关URL,这也是它们的一种情况吗?

localhost:8080
不能是a,因为它们必须以
/
开头(在这种情况下,它将是网络路径引用,通常称为协议相关引用),而
/
,或者使用不包含
的路径段

(对于后一种情况,可以使用
/localhost:8080

localhost:8080
作为
http://localhost:8080
在URI
http://localhost:8080
,零件
localhost:8080
是最新的

部分
localhost
是,部分
:8080

localhost:8080
作为URI
localhost:8080
本身在语法上也是一个URI:

  • localhost
    将是
  • 8080
    将是
但是由于
localhost
不是URI,因此,
localhost:8080
当前是URI