Re: Absolute / relative paths problem
Oliver König <[email protected]>
| Newsgroups | gmane.comp.kde.devel.quanta.user |
|---|---|
| Organization | Windfinder.com |
| Message-ID | <[email protected]> |
On Friday 16 March 2007 01:49:18 Eric Laffoon wrote: > 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? I mean absolute document root links. > 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... Does that mean Quanta does not handle absolute document root links. In Dreamweaver I never had a problem with the absolute document root links. > First of all it is recommended not to use absolute references in your site > for this very reason. It would take years to change all the links in my website to relative document root. the advantage of the absolute document root links is that I can move any html file to any directory or subdirectory below document root and all links and refenrences will always work. > 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. I don't have Apache running on my notebook (but I could do that if needed). So, what should I do now? -- Oliver König Windfinder.com Knorrstr. 24 Hinterhaus 24106 Kiel Germany phone +49 431-8008643 VoIP +49 431-5569222 fax +49 431-8008644 Mobile +49 177-4933362 [email protected] www.windfinder.com