Folder Navigation - HTML

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Coal
Forum Newbie
Posts: 14
Joined: Sun Feb 29, 2004 4:22 pm
Location: Taylorville, IL

Folder Navigation - HTML

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

<a href="/contact/">Contact page</a>
<a href="/home/">Home page</a>
:?:
Coal
Forum Newbie
Posts: 14
Joined: Sun Feb 29, 2004 4:22 pm
Location: Taylorville, IL

Post by Coal »

Didn't work... when I put "/" in front it took me all the way back to my localhost index.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

which once you upload it to your server should work just fine..
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post 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..
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post 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.
Post Reply