View previous topic :: View next topic |
Author |
Message |
DLashley -
Joined: 18 Dec 2002 Posts: 207 Location: New York, NY
|
Posted: Tue Jan 07, 2003 10:43 am Post subject: Need Help re: Relative vs. Absolute Server Paths |
|
|
If the root server path is:
C:\Program Files\Abyss Web Server\
and
...the ABSOLUTE PATH to the "htdocs" directory is:
C:\Program Files\Abyss Web Server\htdocs
and
...the ABSOLUTE PATH to the "cgi-bin" is
C:\Program Files\Abyss Web Server\cgi-bin
What is the RELATIVE PATH to the "htdocs" directory?
What is the RELATIVE PATH to the "cgi-bin" directory?
[example: ../../yada yada yada]
I know how to write it out for my other domain (which is hosted on a Linux server), but setting RELATIVE paths in Windows confuses me.
I'd really appreciate any help anyone can spare about this. Thanks in advance! :-) _________________ DLashley |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Jan 07, 2003 11:54 pm Post subject: Re: Need Help re: Relative vs. Absolute Server Paths |
|
|
DLashley wrote: | If the root server path is:
C:\Program Files\Abyss Web Server\
and
...the ABSOLUTE PATH to the "htdocs" directory is:
C:\Program Files\Abyss Web Server\htdocs
and
...the ABSOLUTE PATH to the "cgi-bin" is
C:\Program Files\Abyss Web Server\cgi-bin
What is the RELATIVE PATH to the "htdocs" directory?
|
The relative path for that is htdocs
DLashley wrote: |
What is the RELATIVE PATH to the "cgi-bin" directory?
|
it is cgi-bin
As a general rule:
Absolute path=root path + \ + relative path
So
C:\Program Files\Abyss Web Server\cgi-bin = C:\Program Files\Abyss Web Server + \ + cgi-bin
where + is the string concatenation operator. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
DLashley -
Joined: 18 Dec 2002 Posts: 207 Location: New York, NY
|
Posted: Wed Jan 15, 2003 6:51 pm Post subject: |
|
|
I'm sorry, but you lost me on this. I just want to know how to write it out.
Can you please write it out for me with the slashes and dots, etc...? I'd really appreciate it.
relative path to htdocs folder:
relative path to htdocs/subdir folder:
relative path to cgi-bin/subdir folder:
relative path to log folder:
P.S. sorry for the delay in responding. I had a death in the family, and haven't been myself lately. _________________ DLashley |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Jan 15, 2003 8:40 pm Post subject: |
|
|
relative path to htdocs folder: htdocs
relative path to htdocs/subdir folder: htdocs/subdir
relative path to cgi-bin/subdir folder: cgi-bin/subdir
relative path to log folder: log
Quote: |
P.S. sorry for the delay in responding. I had a death in the family, and haven't been myself lately. |
We're really sorry to hear of the death that happened in your family. :cry: _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
vbgunz Guest
|
Posted: Thu Jan 16, 2003 1:36 am Post subject: Heres an excellent article which should get you going fast! |
|
|
There are four link styles
1. Absolute
1a. http://www.absolute.com
1b. http://www.absolute.com/candy.html
2. Relative
2a. ../ Goes into the parent directory
2b. /Starts at the root of your site
2c. no slash but a link name like sweeter.htm means the document is currently located within the same directory...
Lets start with "../"
1. http://www.absolute.com/levelone/leveltwo/levelthree/sweet.html
If you're already in level three working on the document sweet.html and you wish to link to a document located in levelone you will need two "../" to back up two directories...
i.e. "../../" and you will need the document name otherwise you would probably see the index page by default...
So lets say you have two documents in levelone... 1. candy and 2. sweeter and you wish to link to them from within levelthree... your links should like this...
1. ../../candy.html
2. ../../sweeter.html
"../" goes back one directory, just remember that and you call use as many as you need to go where you got to go ;)
-------------
Now using the forward slash is simple... It simply tells the link you click on to start within your sites root drectory.
You can call your site root from any directory and or any page using the absloute link "http://www.absolute.com" or you can use the slash "/".
The benefit in using the slash is "mobility" you can if you use all relative links pass your site out on floppies or on CDs but imagine if you didn't use relative links for a second...
When someone uses your site they would have to remain connected to the internet in order to browse it but what if they had no internet connection and then wanted to go back to your homepage from any other page on your site while they were offline?
"http://www.absolute.com" wouldn't work for them the way "/index.html" would...
Relative links are your friends big time when it comes to designing your site
-------------
Now you will also see links like "sweeter.html" and "candy.html" and "sweet.html" but niether of them have a "/" or a "../" so what does that mean?
It means the document is within the same directory so theirs no need to go back one directory "../" or any need to start at the root "/" to go looking for it.
So if you were linking from "candy.html" to "sweeter.html", since their both located in the same directory you can simply make the link "sweeter.html"
I hope that helps :) |
|
Back to top |
|
|
vbgunz Guest
|
|
Back to top |
|
|
vbgunz Guest
|
Posted: Thu Jan 16, 2003 1:41 am Post subject: Damn I dont drink coffee... |
|
|
Damn, I dont drink coffee but I think I'll start today :oops: |
|
Back to top |
|
|
DLashley -
Joined: 18 Dec 2002 Posts: 207 Location: New York, NY
|
Posted: Mon Jan 20, 2003 4:35 am Post subject: |
|
|
OMG!!! I thought I responded to this thread already! I'm so sorry, vbgunz!!! :oops:
Thank you so much for taking the time to write this out for me! This helped me a whole lot! _________________ DLashley |
|
Back to top |
|
|
|