[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] Absolute / relative paths problem
From:       Eric Laffoon <sequitur () kde ! org>
Date:       2007-03-16 0:49:18
Message-ID: 200703151649.19478.sequitur () kde ! org
[Download RAW message or body]

On Thursday 15 March 2007 1:30 pm, Oliver König wrote:
> Hello,
> I have got a website on a remote server. All files on the website use
> absolute paths to other files and images:
>
> Document root (in Apache is):
> /www/htdocs/
>
> For example the file index.html in /www/htdocs/ has an image:
> <img src="/images/img.png">
> and a link to another page:
> <a href="/folder/page.html">page</a>
> Apache then looks at /www/htdocs/images/img.png for the image and
> at /www/htdocs/folder/page.html for the file.
>
> I downloaded all files to /www/htdocs/ on my Notebook. I opened Quanta
> 3.5.6. I created a new Quanta project and in "Directory Settings" I
> defined /www/htdocs/ as the main directory and inserted all files
> from /www/htdocs/ into the project.
>
> Problem:
> When I open a html file in Quanta with the VPL editor or the preview the
> images do not display and the hyperlinks do not. It looks like Quanta
> cannot handle absolute links. How can fix this problem without changing all
> references from absolute to relative?
>
> Thanks
>
> Oliver

This is funny. First I thought you were dealing with temp files, then I 
re-read it. Quanta does handle absolute links. The problem is you not 
differentiating between the file tree and the server tree. You have absolute 
document root links - "/images/img.png" and absolute file 
linkes -  /www/htdocs/folder/page.html. So the question is, what 
does "absolute" men to you? Quanta is inherently in your file system, not 
your web server and interprets absolute in reference to your file system as 
it is not privileged to know you intend to mirror a server system... 

First of all it is recommended not to use absolute references in your site for 
this very reason. Quanta can also deal with projects setting a project 
preview which is typically used to see PHP through a local server. Provided 
you have Apache running this works, and it should work without it for HTML as 
it is just setting a reference. Alternately you could set a <base> tag too, 
but then that's just another way of making things interesting with what 
you're doing.
-- 
Eric Laffoon - Quanta+ Team Leader 
http://quanta.kdewebdev.org
_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic