Page 1 of 1

Folder Navigation - HTML

Posted: Sun Jul 25, 2004 7:48 pm
by Coal
I'm working on setting up my site with a folder for each primary webpage.

For example:
To get to the contact page...
http://www.mysite.com/contact/index.php
(except in the code I would like to only put "contact/index.php" as the link)

And I would like to be able to set links to get back to the homepage or other site pages without having to enter the full site address

For example, traveling from the contact page (contact/index.php) to the homepage (home/index.php) I would prefer to not enter http://www.mysite.com/home/index.php.


Does anyone know the shorthand way to do it?

Posted: Sun Jul 25, 2004 7:57 pm
by feyd

Code: Select all

<a href="/contact/">Contact page</a>
<a href="/home/">Home page</a>
:?:

Posted: Sun Jul 25, 2004 8:12 pm
by Coal
Didn't work... when I put "/" in front it took me all the way back to my localhost index.

Posted: Sun Jul 25, 2004 8:20 pm
by feyd
which once you upload it to your server should work just fine..

Posted: Sun Jul 25, 2004 8:22 pm
by ol4pr0
try

Code: Select all

<a href="./contact/">Contact page</a>
<a href="./home/">Home page</a>

or

<a href="contact/">Contact page</a>
<a href="home/">Home page</a>
you have to mess with that a little..

Posted: Mon Jul 26, 2004 8:57 am
by Draco_03
Absolut path are a BAD IDEA.

Whenever you want to change host or test on your drive or just if you for x reason put it not on your root on the server, you'll have to change ALL your link.

It's basically a bad idea.