W3C home > Mailing lists > Public > www-talk@w3.org > March to April 1996

Resolve Relative URLs

From: <cvr@frontiertech.com>
Date: Sat, 16 Mar 1996 12:44:14 CST
Message-Id: <314B0C01-00000001@rock123>
To: fielding@ics.uci.edu
Cc: cvr@ns.frontiertech.com, web@ns.frontiertech.com, www-talk@w3.org, uri@bunyip.com

I have a problem concerning resolving relative URLs in HTML documents 
served up by Web Servers in response to clicks on ISMAP images. I have 
studied the RFCs: 1808 and the Draft HTTP/1.0 standard but found no 
answer to my problem. I'd appreciate if you could suggest what should 
be done correctly in the framework of web.

Problem Description: 
1. We have a page on our web site with the following structure:


( i.e. B is subdirectory of A and the files: test.map, test.gif and 
x.gif are in B ).

2. mypage.htm has an inline image x.gif, and an active ( ISMAP ) image 
test.gif refering to the test.map file; all these files are  in the 
subdirectory B and are referred to using relative URLs in mypage.htm as 
illustrated below:

<A HREF="B/test.map">

3. TEST.MAP has the following information ( NCSA format ):
    default  /homepage.htm
    rectangle  mypage.htm     1,1 235,210  

4. I loaded the page in my browser ( I have used different browsers 
including NetScape, Microsoft, and Frontier's SHA ): 

The page appears fine. I click on the image ( the click gets sent to 
the server as: "http://myhost/A/B/test.map?50,100",  browser gets back 
mypage.htm fine but it CANNOT GET ANY OF THE INLINE IMAGES  ( x.gif or 
test.gif ). 

5. I checked the HTTP headers sent by the Server and they contain a 
Location header as :

Location: http://myhost/A/mypage.htm\r\n

This must have properly indicated the base URL to the browser ( 
according to HTTP/1.0 Spec ) so it could further resolve inline images 
relative to "/A"; after receiving the "mypage.htm", apparently, the 
browser is trying to get the inline images from "/A/B".

I had the Server sent <WWW-Base: href="http://myhost/A/mypage.htm" > 
but it didn't help.

From this rather verbose description of the problem, could you please 
tell me who is at fault ( the browser or server ). I know for sure that 
if the Server redirects the browser always it works fine, but then this 
not only incurs overhead and additional authentication from the user 
( in case the pages are password protected ).

Thanks for your time and I'd very much appreciate all your answers.


CVR Murthy 
Engineering                                   Tel: 414 - 241 4555 ( W )
Frontier Technologies Corp.                   414 - 352 6117 ( H )
10201 N. Port Washington Road  E-mail: cvr@FrontierTech.Com.
Mequon, WI 53092.                        
WEB: http://www.FrontierTech.Com
Received on Saturday, 16 March 1996 13:46:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:58 UTC