Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Subfolder Link Problem
Old 09-02-2007, 01:51 PM Subfolder Link Problem
Novice Talker

Posts: 7
Trades: 0
I'm having trouble linking to my subfolders. After I click on a subfolder, any subfolder's path would appear twice in the address/url.

Here's what happened (domain and subfolder names are made up)...

I went to directly to the subfolder: www.mydomain.com/drinks

Clicked on the link to subsubsubfolder

Arrived at www.mydomain.com/drinks/caffeine/coffee/

Clicked on the link to another subsubsubfolder...

Page won't load because the address was www.mydomain.com/drinks/caffeine/coffee/caffeine/tea... when it was supposed to be www.mydomain.com/drinks/caffeine/tea

I don't know if I'm linking the folders wrong. I tried typing out the full path, but that doesn't work. The repetition of subfolders in the address still happens when I do the same thing listed above.

At first, I linked those subfolders like this (they're supposed to be a part of the navigation bar, by the way):
Code:
<a href="caffeine/coffee">Milk</a>
<a href="caffeine/tea">Tea</a>
Then I tried:
Code:
<a href="http://www.mydomain.com/drinks/caffeine/coffee">Milk</a>
<a href="http://www.mydomain.com/drinks/caffeine/tea">Tea</a>
Then I tried:
Code:
<a href="caffeine/coffee/index.php">Milk</a>
<a href="caffeine/tea/index.php">Tea</a>
Then I tried:
Code:
<a href="http://www.mydomain.com/drinks/caffeine/coffee/index.php">Milk</a>
 <a href="http://www.mydomain.com/drinks/caffeine/tea/index.php">Tea</a>
None worked. What am I doing wrong? Please help me.

Edit:
drinks, caffeine, coffee, and tea are all folders and they each have their own index.php file

here's how the folder hierarchy looks like:

public_html
|
drinks
|
caffeine
/ \
coffee tea


(there are a lot more folders actually xD )

Last edited by Cherriii; 09-02-2007 at 03:12 PM..
Cherriii is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-02-2007, 02:34 PM Re: Subfolder Link Problem
Experienced Talker

Posts: 49
Trades: 0
inside the coffee folder you have folder inside named tea? or is that tea a php file that is inside the coffee folder?
__________________
Time to upgrade your website! Visit us at:
Please login or register to view this content. Registration is FREE
.
- Professionals Designs with Details
Cyrus is offline
Reply With Quote
View Public Profile
 
Old 09-02-2007, 02:42 PM Re: Subfolder Link Problem
Novice Talker

Posts: 7
Trades: 0
[please read edit, sorry]

Last edited by Cherriii; 09-02-2007 at 03:13 PM.. Reason: correction
Cherriii is offline
Reply With Quote
View Public Profile
 
Old 09-02-2007, 02:47 PM Re: Subfolder Link Problem
Experienced Talker

Posts: 49
Trades: 0
try for the tea folder

HTML Code:
  <a href="http://www.mydomain.com/coffee/tea/index.php">Tea</a>
__________________
Time to upgrade your website! Visit us at:
Please login or register to view this content. Registration is FREE
.
- Professionals Designs with Details
Cyrus is offline
Reply With Quote
View Public Profile
 
Old 09-02-2007, 03:16 PM Re: Subfolder Link Problem
Novice Talker

Posts: 7
Trades: 0
Hi Cyrus,

I actually already tried what you suggested, but I went ahead and tried again. Guess what?! It worked!!! I don't know or understand how, but it worked this time. When I hover over the links, there was no more subfolder repetition. I then took out the "index.php" part and it was still working.

Thank you very much. ^_^

Edit:
I wish I can find out what caused the problem in the first place xD

Last edited by Cherriii; 09-02-2007 at 03:17 PM..
Cherriii is offline
Reply With Quote
View Public Profile
 
Old 09-02-2007, 03:43 PM Re: Subfolder Link Problem
Experienced Talker

Posts: 49
Trades: 0
in the examples you showed us the first three examples were wrong. You have to put the index.php in order to tell the browser to go there, because there could be other files inside tea folder or the milk folder. For example you can go to

<a href="http://www.mydomain.com/drinks/caffeine/tea/example.php">Example</a>
that would take you to example.php.

Now the last example you gave us was actually correct, don't really understand how this wouldn't worked, but since it worked the second time you did it maybe, you mistyped something in there.

Another way of doing this is

The links for the caffeine folder
HTML Code:
<a href="/tea/index.php">tea</a>
Links in subfolders inside the caffeine folder
HTML Code:
<a href="../tea/index.php">tea</a> 
or
<a href="../coffee/index.php">tea</a> 
Regards,
Cy
__________________
Time to upgrade your website! Visit us at:
Please login or register to view this content. Registration is FREE
.
- Professionals Designs with Details
Cyrus is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Subfolder Link Problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.50056 seconds with 12 queries