head
我的文档中有以下标签:
<base href="/some/folder/">
.
假设我的网站位于http://example.com
. 一个链接,像这样:
<a href="foo/bar/">...</a>
页面上将解析为http://example.com/some/folder/foo/bar/
.
但是,像这样的链接:
<a href="/">...</a>
当我真正希望http://example.com
它指向http://example.com/some/folder/
.
在这种情况下,如何创建指向应用程序基础的链接,而无需http://example.com
在任何地方进行硬编码?