Re: Linking to a directory on my hard drive
by "Abhay S. Kushwaha" <abhay(at)kushwaha.com>
|
Date: |
Sat, 29 Apr 2000 16:24:47 +0530 |
To: |
"Basics [HWG]" <hwg-basics(at)hwg.org> |
References: |
mona |
|
todo: View
Thread,
Original
|
|
The funda is rather simple. Let's assume that you have this tree
root
- main
--- sub
----- sub2
--- s01
Now, if I am currently in sub2, the sub directory is "../" from me and
the main directory is "../../" from me. Similarly, the s01 directory
is "../../s01/" from me.
That is, each "../" will take you one directory *higher* in the
directory hierarchy.
What is going wrong:
Taking help of the above structure, evidently you are in sub2 and
want to take something from s01. So, when you issue the link call
to "/main/s01/blah.html", the browser, upon seeing that there are
no "../" there will simply put in *front* of current directory.
That is, if we are in
/main/sub/sub2
the browser will assume the link to be
/main/sub/sub2/main/s01/blah.html
which obviously does not exist.
Solution:
As explained, just put a "../" for every level of directory
hierarchy that you want to go "up" and then continue
That is, the call in our case would be to
"../../s01/main.html"
:)
[abhay]
----- Original Message -----
From: Mona Guterman <mona_g(at)naan.org.il>
Subject: Linking to a directory on my hard drive
> Hello all. I have been lurking for ages and have found this
> list extremely useful. However now I need your help for
> something which is very basic.
>
> I am setting up an Intranet site and doing the work using
> CuteHTML on my hard drive. I have the main pages in one
> directory and am using another directory for secondary pages,
> etc.
>
> I have used the following codes and neither have helped me.
> They are:
> <a href="/maindirectory/subdirectory/blah.html">blah</a> or just
> <a href="/subdirectory/blah.html">blah</a>
> The page with the link does come up on the browser and when
> I click the link the next page I get is from IE saying "The page
> cannot be displayed, click refresh etc. etc.
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA