Fixed broken links between pages by checking which level the current page was on and rewriting the links as relative links.