Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/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
Html href=";/&引用;指向错误的URL_Html - Fatal编程技术网

Html href=";/&引用;指向错误的URL

Html href=";/&引用;指向错误的URL,html,Html,我一直认为相对URL是相对于浏览器地址栏中的URL的。但今天我的信念动摇了 在具有URL的网页中https://localhost:44372/docs/morpher.ru/ws/3/russian/declension/GET 我放了一个href,看起来像这样: 当我单击链接时,浏览器会将我带到 https://localhost:44372/response-格式/index.md 而我希望被带到 https://localhost:44372/docs/morpher.ru/ws/r

我一直认为相对URL是相对于浏览器地址栏中的URL的。但今天我的信念动摇了

在具有URL的网页中https://localhost:44372/docs/morpher.ru/ws/3/russian/declension/GET 我放了一个href,看起来像这样:


当我单击链接时,浏览器会将我带到

https://localhost:44372/response-格式/index.md

而我希望被带到

https://localhost:44372/docs/morpher.ru/ws/response-格式/index.md

我的期望不正确吗?相对路径真正相对于什么


很可能有一个
标签

可以按如下方式更改相对路径基:

<base href="https://example.com/new-base" />


然后,一切都与此相关,而不是页面URL是什么。

-您的期望是正确的。也许你错过了某个重定向响应。也许这对你有帮助你是对的。有一个基标记:。该死的剃刀。谢谢