Welcome to HostingForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Help on HTML and Relative URL's?

 
   Web Hosting Problem Solving Community! (Home) -> Webmaster RSS
Next:  Install IIS 5.1 Error  
Author Message
user442

External


Since: Apr 01, 2004
Posts: 85



(Msg. 1) Posted: Sun Apr 03, 2005 12:35 pm
Post subject: Help on HTML and Relative URL's?
Archived from groups: alt>www>webmaster (more info?)

I am modifying some html code that was originally developed by someone else on a
MAC using Dreamweaver. The following line is an example of a some code that I'm
having a problem with:

<A HREF="../schedule.htm"> Scheduled Hours </A>

In my limited knowledge of HTML, ../ means look in one directory up for the file
schedule.htm. However, on my local PC, schedule.htm is in the current directory
so it can't be found. Perhaps there is some setting in Dreamweaver that makes it
work.

What I don't understand is if I upload this to a cpanel web-host in the
directory public_html, along with all of the other HTM files, it works okay.
That is, it appears that in cpanel the ../ is ignored and the code works okay.

Questions:

1. Why does it (the ../) work in cpanel but not on my local computer?

2. Is there some setting in Dreamweaver that allows this to work on a local
computer?

I know the simple answer to this is to go through all of the code and delete all
appearances of ../

 >> Stay informed about: Help on HTML and Relative URL's? 
Back to top
Login to vote
spam19

External


Since: May 08, 2004
Posts: 953



(Msg. 2) Posted: Sun Apr 03, 2005 12:35 pm
Post subject: Re: Help on HTML and Relative URL's? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sun, 03 Apr 2005 11:31:33 -0400, Arnie Goetchius
wrote:

 > 1. Why does it (the ../) work in cpanel but not on my local computer?

If such a link is online and is in the root directory, conforming clients
should see this and search for the file in the root directory. Failing
that, a conforming server should not let HTTP requests move above the
"public html" folder and thus should discard the "../".

When you put this link on your local computer, neither of these failsafe's
exist.

 > 2. Is there some setting in Dreamweaver that allows this to work on a
 > local computer?

I wouldn't know. It's best to fix the erronious link so it works properly
in both places, IMHO.

 > I know the simple answer to this is to go through all of the code and
 > delete all appearances of ../

You got it.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
- <a rel="nofollow" style='text-decoration: none;' href="http://www.greywyvern.com/webslavent?msg=149" target="_blank">http://www.greywyvern.com/webslavent?msg=149</a> - Presto the Puffin!

 >> Stay informed about: Help on HTML and Relative URL's? 
Back to top
Login to vote
user442

External


Since: Apr 01, 2004
Posts: 85



(Msg. 3) Posted: Sun Apr 03, 2005 1:35 pm
Post subject: Re: Help on HTML and Relative URL's? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

GreyWyvern wrote:

 > On Sun, 03 Apr 2005 11:31:33 -0400, Arnie Goetchius

 >
  >> 1. Why does it (the ../) work in cpanel but not on my local computer?
 >
 >
 > If such a link is online and is in the root directory, conforming
 > clients should see this and search for the file in the root directory.
 > Failing that, a conforming server should not let HTTP requests move
 > above the "public html" folder and thus should discard the "../".
 >
 > When you put this link on your local computer, neither of these
 > failsafe's exist.
 >
  >> 2. Is there some setting in Dreamweaver that allows this to work on a
  >> local computer?
 >
 >
 > I wouldn't know. It's best to fix the erronious link so it works
 > properly in both places, IMHO.
 >
  >> I know the simple answer to this is to go through all of the code and
  >> delete all appearances of ../
 >
 >
 > You got it.
 >
 > Grey
 >

Thanks for the explanation. I'll fix it. It's a mystery to me how the original
author could have viewed this properly on a MAC.
 >> Stay informed about: Help on HTML and Relative URL's? 
Back to top
Login to vote
Ben Jamieson

External


Since: Mar 19, 2005
Posts: 67



(Msg. 4) Posted: Sun Apr 03, 2005 7:50 pm
Post subject: Re: Help on HTML and Relative URL's? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2005-04-03 12:09:59 -0400, Arnie Goetchius said:

 > Thanks for the explanation. I'll fix it. It's a mystery to me how the
 > original author could have viewed this properly on a MAC.



It's Mac, not MAC (MAC is a Media Access Control address, and relates
to ethernet hardware), but to answer your question, the developer was
most likely using Apache (standard on all Macs) which is a a
'conforming' server, and would handle the ../ removal properly.

just remove it completely and all should be good.
 >> Stay informed about: Help on HTML and Relative URL's? 
Back to top
Login to vote
user442

External


Since: Apr 01, 2004
Posts: 85



(Msg. 5) Posted: Tue Apr 05, 2005 12:32 pm
Post subject: Re: Help on HTML and Relative URL's? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ben Jamieson wrote:

 > said:
 >
  >> Thanks for the explanation. I'll fix it. It's a mystery to me how the
  >> original author could have viewed this properly on a MAC.
 >
 >
 >
 >
 > It's Mac, not MAC (MAC is a Media Access Control address, and relates to
 > ethernet hardware), but to answer your question, the developer was most
 > likely using Apache (standard on all Macs) which is a a 'conforming'
 > server, and would handle the ../ removal properly.
 >
 > just remove it completely and all should be good.
 >

Okay, understand. Thanks for responding.
 >> Stay informed about: Help on HTML and Relative URL's? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Relative Positioning? - I've just had a go at using relative positioning but am finding major differences between IE6 and Netscape 7. I would normally assume Netscape to be the correct version but IE seems to be doing things as I expect and Netscape is all over the place. Anyon...

relative or abolute links? - is it advisable to use absolute adresses or should i use relative? i'm referring to links to pictures. is this such a small point that it falls to the category of minutiae? or are there real concerns as to one being preferrable? thanks in advance ...

Relative popularity of browsers. - Can someone give me the URL of a (fairly) definitive and authoritative comparison between MSIE Firefox and Opera, please? TIA.

absolute and relative positions - have been trying for hours to do this and still failing :( i want to position an image and a body of text on a page and have the positions remain the same relative to each other regardless of how wide the browseser window is. sounds easy but it isnt...

Relative links between two servers? - I need some advice on a sitauation I've never had to deal with before. I have a client with a high traffic site currently located on a dedicated Linux server. They are thinking about adding a second dedicated server and moving half to three quarters o...
   Web Hosting Problem Solving Community! (Home) -> Webmaster All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can 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



[ Contact us | Terms of Service/Privacy Policy ]