有没有一种方法可以让页面上的所有链接都相对于根目录?
例如,在www.example.com/fruits/apples/apple.html
页面上,我可以添加一个链接:
<a href="fruits/index.html">Back to Fruits List</a>
这个链接将会指向 www.example.com/fruits/apples/fruits/index.html
还是 www.example.com/fruits/index.html
?如果是前者,有没有办法让它指向后者?
/
将使其相对于www.example.com
,是否有一种方法可以指定根目录,例如如果我想要在www.example.com/fruits/apples/apple.html
中将根目录设置为www.example.com/fruits
,该怎么办? - Ali