Need Help re: Relative vs. Absolute Server Paths

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
DLashley
-


Joined: 18 Dec 2002
Posts: 207
Location: New York, NY

PostPosted: Tue Jan 07, 2003 10:43 am    Post subject: Need Help re: Relative vs. Absolute Server Paths Reply with quote

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 View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jan 07, 2003 11:54 pm    Post subject: Re: Need Help re: Relative vs. Absolute Server Paths Reply with quote

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 View user's profile Send private message Send e-mail
DLashley
-


Joined: 18 Dec 2002
Posts: 207
Location: New York, NY

PostPosted: Wed Jan 15, 2003 6:51 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Jan 15, 2003 8:40 pm    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail
vbgunz
Guest





PostPosted: Thu Jan 16, 2003 1:36 am    Post subject: Heres an excellent article which should get you going fast! Reply with quote

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





PostPosted: Thu Jan 16, 2003 1:40 am    Post subject: I'm sorry but I made two booboos Reply with quote

One is I only showed you 3 of the four link styles... The last style is anchor links...

My next booboo is the very first absolute link mentioned is wrong http://www.absolute.com/levelone/leveltwo/levelthree/sweet.html

it should really read
http://www.absolute.com/levelone/leveltwo/sweet.html

I simply the directoy removed the levelthree directory otherwise sweet would be located in a fourth level somewhere...

Sorry :(
Back to top
vbgunz
Guest





PostPosted: Thu Jan 16, 2003 1:41 am    Post subject: Damn I dont drink coffee... Reply with quote

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

PostPosted: Mon Jan 20, 2003 4:35 am    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group