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

List:       quanta
Subject:    Re: [Quanta] Absolute / relative paths problem
From:       Oliver =?iso-8859-1?q?K=F6nig?= <oliver () windfinder ! com>
Date:       2007-03-16 9:05:36
Message-ID: 200703161005.36786.oliver () windfinder ! com
[Download RAW message or body]

On Friday 16 March 2007 09:14:38 Eric Laffoon wrote:
> On Thursday 15 March 2007 11:51 pm, Oliver König wrote:
> > 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.
>
> I know, but you used both as if interchangeable.
Sorry.
>
> > > 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.
>
> No of course not! It means you haven't told it to use this.
Good!
>
> > In
> > Dreamweaver I never had a problem with the absolute document root links.
>
> We're not Dreamweaver, which is why a lot of people will never go back. We
> don't really care what they do, like use the site as a repository, eschew
> version control and use proprietary hacks to make HTML do what should have
> been done with PHP. However we do have to accommodate people who got locked
> into their approach.
I did not say that to insult you. I just wanted to say that in Dreamweaver 
this feature is available and was easy to use.

Apart from that I believe that Dreamweaver has some very good strengths (like 
the WYSIWYG mode which works very well and produces good code) and it has 
some weaknesses like support for PNG, no support of sdtp/fish and that it is 
not available for Linux. But I don't want to compare Quanta with DW here. 

> > > 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.
>
> You could change them in minutes with KFilereplace if you wanted to. You
> can also use the base tag in HTML to accomplish this. I personally set up a
> per directory addressing file using PHP and give it the same name in all
> directories, then include it in all files. That way I can also manage
> included files and files across subdirectories.
You are rgith that I would not take much time but I don't see a good reason 
for changing from absolut doc root to relative doc root (yet). To be honest I 
don't know what you mean by "You can also use the base tag in HTML to 
accomplish this". Sorry for that but would you explain? Thanks!
>
> > > 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?
>
> I am not sure if you need it. I always do for PHP, but if you are just
> pointing there in a file tree address it should work assuming the address
> is accepted.
> If not then using Apache will certainly work and as a bonus 
> you can integrate server side scripting at any time and live test it. Just
> look at the project preview address in the project dialog and put your
> document root in there. If it doesn't accept a file:/ address set up Apache
> and use http://localhost/.
Actually, you are right that it would be best to run Apache. then I could test 
the PERL scripts and SSI locally.

Thanks for your feedback.


-- 
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
oliver@windfinder.com
www.windfinder.com
_______________________________________________
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