Having links relative to root?
问题 Is there a way to have all links on a page be relative to the root directory? For example, on www.example.com/fruits/apples/apple.html I could have a link saying: <a href=\"fruits/index.html\">Back to Fruits List</a> Would this link be pointing to www.example.com/fruits/apples/fruits/index.html or www.example.com/fruits/index.html ? If the first, is there a way to have it point to the 2nd instead? 回答1: A root-relative URL starts with a / character, to look something like <a href="