HTML href路径异常行为

HTML href路径异常行为,html,url,href,Html,Url,Href,我在这个网站上看到了一个奇怪的行为: 有一个按钮可以打印包含以下href的页面: 它不是应该像这样构建链接,重复/tc/acordaos/part吗 http://www.tribunalconstitucional.pt/tc/acordaos/tc/acordaos/?impressao=1 为什么浏览器按如下方式正确构建链接?我是不是遗漏了什么 http://www.tribunalconstitucional.pt/tc/acordaos/?impressao=1 href中的前缀/表示

我在这个网站上看到了一个奇怪的行为:

有一个按钮可以打印包含以下href的页面:

它不是应该像这样构建链接,重复/tc/acordaos/part吗

http://www.tribunalconstitucional.pt/tc/acordaos/tc/acordaos/?impressao=1 为什么浏览器按如下方式正确构建链接?我是不是遗漏了什么

http://www.tribunalconstitucional.pt/tc/acordaos/?impressao=1 href中的前缀/表示主机名的根目录

例如,像这样的东西,例如:com/doo:

href=/foo/bar将转到example.com/foo/bar


如果没有添加前缀/,它将进入example.com/doo/foo/bar

Wow。当然谢谢现在我觉得问这个问题真的很愚蠢。