Search code examples
htmldomhref

how can i make href to upper directory go up


I have an html page in url: http://localhost:63343/x/html_pages/http_failures_table/http_failures_table_agg_bl.html

with href:

<a href="../http_failures_dict/http_failures_dict_bl_0.txt">

but when i click the url I'm directed to:

http://localhost:63343/x/html_pages/http_failures_dict/http_failures_dict_bl_0.txt

instead of

http://localhost:63343/x/http_failures_dict/http_failures_dict_bl_0.txt

how can i fix this?


Solution

  • You can either go back two directory levels instead of one:

    <a href="../../http_failures_dict/http_failures_dict_bl_0.txt">
    

    or start from the root:

    <a href="/x/http_failures_dict/http_failures_dict_bl_0.txt">