Resolve Relative URLs

Hello!

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:

/A/mypage.htm
   /B/
        test.map
        test.gif
        x.gif

( 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:

<IMG SRC="B/x.gif" ALIGN=BOTTOM><BR>
<A HREF="B/test.map">
<IMG SRC="B/test.gif" ISMAP ALIGN=BOTTOM></a>

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 ): 
http://myhost/A/mypage.htm

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

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:48 UTC