html - Using a relative URL scheme effectively -
using has of issues on anchor-tags described in this question on base tags making hard use on site.
i have navigation menu in site references different parts of site
for example
main/ |_index.html |_section1/ |_1a.html |_1b.html
and navigation section on each page looks like
<div id="nav"> <ul> <li><a href="index.html">home</a></li> <li><a href="section1/1a.html">1a</a></li> <li><a href="section1/1b.html">1b</a></li> </ul> </div>
this works fine pages on in main
folder pretty obvious reasons fails when i'm viewing page in section1
folder. can't use <base>
because have large number of anchors in documents (and i'm using markdown cant change reference format easily).
i'm concerned if use absolute references on pages, when upload site server huge amount of work replace absolute reference on each page different one.
in addition main
few levels down in /home/
directory , prefer not have type long path-name each time refer if possible
i guess if pushed use sed
change instances of absolute path else wondered if there easier, obvious way of dealing in html i'm missing. thanks
you can make use of htaccess
, if can't use <base>
in html
Comments
Post a Comment