Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

What does this mean, as far as a reference to a URL?

If I'm documenting a relative URL, in other words, I'm not documenting it as "http://www.whatevercom," then I'm going to use a combination of characters so my user will be routed correctly when the click on the link.

If the file is sitting in the current directory, then my relative URL would look like this:

"myfile.htm"

If it was sitting in a directory one level up from my user's current location, then that URL would look like this:

"../first_folder/myfile.htm"

And just to be clear, here's my hierarchy:

root
anotherfile.htm
     first_folder / myfile.htm
     second_folder - my user's current location
          second_subfolder

...and if my user wanted to access "anotherfilehtm" in the root directory, based on my architecture I've got above, then my URL would look like:

"../../anotherfile.htm"

Cake and ice cream, right? Basic stuff. But now I'm looking at another programmer's code and they their css file referenced like this:

<link rel="stylesheet" href="/css/AreaBasePage.css" typr="text/css" />

I'm stumped! I've never seen a file name prefaced with anything other than "../" or something similar. Where is my file located if it's referenced as "/myfile?"
SOLUTION
Avatar of Phillip Burton
Phillip Burton

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Shaun Kline
Shaun Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial