PC Playground  

Go Back   PC Playground > The Core > Scripting/Programming
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-22-2003, 10:49 PM
ick ick is offline
Junior Member
 
Join Date: Jan 2003
Posts: 7
Send a message via ICQ to ick
Default linking and navigation problem (newbie)

for example, say I have a homepage at domain http://www.myhomepage.com which has the following files

album/
album/albumindex.php
album/album1.html
album/album2.html
index.php
navigation.html
home.html
-----------------------------------------------------------------
(index.php)

<? include("navigation.html") ?>
<? $content=$_GET["content"] ;
if (!$content) $content="home.html";
include($content) ?>
------------------------------------------------------------------
(navigation.html)
...
<body>


album 1


album 2
...
</body>
-------------------------------------------------------------------
(album/albumindex.php)

<? include("../navigation.html") ?>
<? $content=$_GET["content"] ;
if (!$content) $content="album1.html";
include($content) ?>
----------------------------------------------------------------------------------
When I click on the link album 1 in index.php it show
album/albumindex.php?content=album1.html
at this page if I now click on the link album 2, it tries to access
album/album/albumindex.php?content=album2.html
which does not exist. How can I solve this problem? Also, how can I make sure all the links are with respect to the root folder? Note that I do not want to make all links URL absolute because if I have to change host (or add a mirror site), I will have to change all the URL again.

Thanks for reading and helping.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:08 PM.