Html href=";/&引用;指向错误的URL
我一直认为相对URL是相对于浏览器地址栏中的URL的。但今天我的信念动摇了 在具有URL的网页中https://localhost:44372/docs/morpher.ru/ws/3/russian/declension/GET 我放了一个href,看起来像这样: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
当我单击链接时,浏览器会将我带到
https://localhost:44372/response-格式/index.md
而我希望被带到
https://localhost:44372/docs/morpher.ru/ws/response-格式/index.md
我的期望不正确吗?相对路径真正相对于什么
很可能有一个
标签
可以按如下方式更改相对路径基:
<base href="https://example.com/new-base" />
然后,一切都与此相关,而不是页面URL是什么。-您的期望是正确的。也许你错过了某个重定向响应。也许这对你有帮助你是对的。有一个基标记:。该死的剃刀。谢谢