|
Posted by Oli Filth on 09/28/10 11:16
Ralph Zajac wrote:
> Hi
>
>
>
>>>I'm trying to rewrite my www page from static html to php. I'm using
>>>Dreamveawer as an editor.
>>>
>>>I designed very simple template http://slackware.asmonet.net/tmp2. I want
>>>all pages to load in the center column. But I run into some problems.
>>>Articles in my page are in few directories. When I'm loading a page into
>>>center column all links stop working. I need to change them as they ware
>>>relative to directory where index.php is (not the page I'm loading).
>>>That would not be a problem but when I'm trying to edit pages I don't
>>>see any pictures and so on because links work only when the page is
>>>loaded to central column. Is there a way around it or maybe some trick?
>>>Anysuggestions?
>>>
>>
>>All your links in the central section of that page are file:// URLs, not
>>http:// URLs, so of course they're not going to work!
>
> Yes I know it's only example how the page will look like. My point is that
> do I need to change all links in my page relative to folder where index.php
> is? Or there is maybe a trick that will make links displayed in index.php
> central column work and when I'm displaying only a page that is loaded
> there?
I don't understand what you mean when you talk about loading a page into
the centre column. Do you mean you intend to use frames?
Links on a webpage must either be absolute (e.g.
http://example.com/foo/bar.html), or relative to the current page
(unless you use set a <BASE> URL, but that's just getting complicated).
e.g. if you're currently at http://example.com/foo/bar.html, a link like
<A href="../images/page.html"> will take you to
http://example.com/images/page.html.
The same logic applies in <IMG> elements as well.
--
Oli
Navigation:
[Reply to this message]
|