Basic HTML - does relative path to a sub-folder (using the directory name) work on a desktop? -


I'm practicing some basic HTML on Mac OS 10.6.6.

Say I am here:

rootfolder / index.html

and I want to go here:

rootfolder / subfolder / index .html

I understand that I can use relative paths to create a link:

  & lt; A href = "subfolder / index.html" & gt; Subfolder links & lt; / A & gt;   

This works for me in my browser.

And if I want to minimize the href, then I can do this:

  & lt; A href = "subfolder /" & gt; Link to subfolder & lt; / A & gt;   

When I click on the short version in my browser, the link takes me to the folder on my desktop (not on the page in my browser)

I Thinking, do you need to have a file in a web host environment for a short version to work in a browser? "post-text" itemprop = "text">

when / bob / = & gt; /bob/index.html works, it usually happens because the server has listed it as its directory index, e.g. With Apache ... Directory Index Index index.php

... in the request of a folder means, first see whether There is no index.html or index.php (in that order).

So if you place it on your local folders Filesytem (i.e. file: protocol), there is no server in it and address is not that empty directory index.html should be requested.

Comments