Relative paths!!!!!

  •  07-04-2006, 11:06 AM

    Relative paths!!!!!

    I have a problem with relative paths.
    Suppose to define a site where a specific URL: http://192.168.1.4/Site/Pages is corresponding  to a physical path 'c:\Tex\Site\Pages'.
    The structure of the folder Tex is:
     
    C:
       Tex
          bin
          CuteSoft_Client
          Site
             Pages
                img
     
    Now in the folder 'Pages' is stored a page 'index.html' whereas in img folder is stored the file 'foot.img'.
    The page 'index.html' is so defined:
     
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE html PUBLIC "-//DVB//DTD XHTML DVB-HTML 1.0//EN" "http://www.dvb.org/mhp/dtd/dvbhtml-1-0.dtd">
    <html>
    <head>
    <title>Regione Veneto</title>
    </head>
    <body>
    <p><img src="img/foot.jpg" /></p>
    </body>
    </html>
     
    I have tried to edit this page using your editor .i.e. calling the method: editor.LoadFile(path) where path is equal to "C:\Tex\Site\Pages\index.html". Well, the page is rendered without the effect of the image 'foot.img' beucase its relative path is translated erroneusly in 'C:\Tex\img\foot.jpg' instead of  'C:\Tex\Site\Pages\img\foot.jpg'  (I know this beucase I debug my httphandler on the server).
    Of course if I change the relative path in the corresponding absolute path of the image all is ok. Besides if I call the page using I.E. with the URL: http://192.168.1.4/Site/Pages/index.htm, the page is rendered successfully.
     
    Can you tell me something about this problem ?.
     
    Best Regards
     
View Complete Thread