473,385 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Linking to a file one directory up, or into a different folder

kestrel
1,071 Expert 1GB
i have one folder, in side another folder, in the main directory
how do i make a link to a page in the main folder?
this is hard to explain...
Expand|Select|Wrap|Line Numbers
  1.                      Main Directory
  2.                                 |
  3.      --------------------------------------------------------------
  4.       |                               |                            |
  5.   Folder 1                        Folder 2                 Index.html
  6.       |                              |
  7.   one.html                         two.html
  8.  
how do i get one.html to link to two.html if its in another folder?
also
how do i link one.html to a index.html, one folder up?
Aug 27 '06 #1
1 23935
Banfa
9,065 Expert Mod 8TB
use a relative or absolute patha url consists or several parts

Expand|Select|Wrap|Line Numbers
  1.  http://www.thescripts.com/forum
  2.  
  3.  \___/\__________________/\_____/
  4.    |            |            |
  5. Protocol   Domain Name      Path
  6.  
The path can be relative or absolute to the current path, in fact all parts of the URL are optional, if they are left out then they are assumed to remain the same as the current page

so

//www.thescripts.com
Go to The Scripts, use the current protocol

/index.html
Go to the index page of the current domain using the current protocol


//www.thescripts.com/index.html
Go to the index page of the Scripts using the current protocol

http://www.thescripts.com/index.html
Go to the index page of the Scripts using the HTTP

In the path you can also use .. to indicate 1 directory down.

To link to two.html from one.html you can use all of the following

http://MyDomain.com/Folder 2/two.html
//MyDomain.com/Folder 2/two.html
/Folder 2/two.html
../Folder 2/two.html

To link to index.html from one.html you can use

http://MyDomain.com/index.html
//MyDomain.com/index.html
/index.html
../index.html

because index.html is automatically assumed (normally) if no file name is given you can also use


http://MyDomain.com/
http://MyDomain.com
//MyDomain.com/
//MyDomain.com
/
../
Aug 27 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mario T. Lanza | last post by:
I am working with Visual Studio. The solution I am developing is composed of about 8 separate projects. Some of these projects represent different tiers in the N-tiered architecture (data,...
1
by: Maurice Mertens | last post by:
Hi all, is it possible to programmatically determine the current users permissions on a file / directory? I want to check if the user can add/delete files to a folder. -- Met vriendelijke...
1
by: Yostage | last post by:
I'm trying to use some code that's roughly 20 years old with my C++ ..NET app. I get a boatload of errors when trying to compile it - stuff like C2692 for the old-style function declarations, also...
8
by: gil | last post by:
Is it possible to prevent a browser from listing the entire contents of a folder? The site, is hosted on my ISP with the following layout- site/ "user name from ISP" pagefile (dir)...
2
by: Antonio-F100 | last post by:
Hello, I need help creating the code for a macro button on a form that will open a file directory with windows explorer. I have about 500 directories with very long names and only want to...
1
by: amfony | last post by:
Hello everyone, first post, very very very noob, and yes its a uni homework thing. My question is how does one read from a given text file strcutured like this: Name, ID, Cost,...
2
by: Kesavan | last post by:
On uploading file.., the file moves into the temp dir "C:\Windows \Temp" which is not accessible in the server. Is there any way to store the uploaded files in a new directory and then move it to...
1
by: dolmen | last post by:
i've finished my vb6 program. when i create exe file in the same folder, the exe file working but when copy only the exe file in to different folder the exe file can't work. any have idea? please.
4
by: vjsarthy | last post by:
How do I include a include file which is in a different folder and the .c file where I am calling this file is in a different folder? Lets say I want to include sample.h file which is in a...
4
by: sadsan | last post by:
Hi everyone I'm after some advice and i don't know if this has already been developed or not. I'm wanting to be able to start a program automatically when its drop into a folder specifically a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.