Jump to content

Link to folder?


eduard
 Share

Recommended Posts

Can you make a link to a folder or do you have to put the folder into a html document?
You mean as in a filesystem folder?Sort of. You can't directly create a link to a folder in the sense that it will open the folder for viewing. If you exclude the filename from the link (ie, you have a link that looks like this: www.somesite.com/aDirectory/), it will search for a file with one of several names, like index.html, index.php, etc. within that directory.
Link to comment
Share on other sites

what do you mean? What kind of folder, what kind contents? What exactly are trying to do?
A link from my homepage to a folder which contains 3 (html) documents?
Link to comment
Share on other sites

A link from my homepage to a folder which contains 3 (html) documents?
right, i get that you're trying to link to HTML documents, but for what purpose? You can link to just a folder without an index.* designated file and the browser will probably just show all the files in the folder, something like this:http://analogstudios.net/images/However, if you are trying to link to folder so that users can download the files, you might be better off creating a zip file for them to download the files with.If you are trying to get those HTML files to be rendered, or included in the page somehow, then it would be good to know what exactly you are trying to do (with these files).
Link to comment
Share on other sites

Can you make a link to a folder or do you have to put the folder into a html document?
If the folder is within the document root (a.k.a. the webroot folder; the "htdocs" one), you can just link to it from any HTML document.Are you talking about a folder that's outside of the document root folder? If so, well... it's a little more difficult, but yes, it's possible. I'd highly reccomend you avoid doing it though, and instead just move all files you want within the document root folder.
Link to comment
Share on other sites

hmm, maybe I was over thinking it. If you have your webroot, i.e. htdocs, and you have a folder with html documents in it, like this

/ - index.html - style.css - pages/   - pageA.html   - pageB.html    - pageC.html

then a link from index.html to pageA.html would just be:

<a href='pages/pageA.html">My Link</a>

Link to comment
Share on other sites

If the folder is within the document root (a.k.a. the webroot folder; the "htdocs" one), you can just link to it from any HTML document.Are you talking about a folder that's outside of the document root folder? If so, well... it's a little more difficult, but yes, it's possible. I'd highly reccomend you avoid doing it though, and instead just move all files you want within the document root folder.
Thanks very much! It is a folder called ´web designer´for my website!All folders and files of my website are saved in the folder Eduard Lid! Can I see the folder ´web designer´off-line or do I have to upload this folder and how can I obtain the root? Edited by eduardchile
Link to comment
Share on other sites

You can link to just a folder without an index.* designated file and the browser will probably just show all the files in the folder, something like this:http://analogstudios.net/images/
Oh, snap. I didn't think that was possible. Learn something new every day, I guess... :)
Link to comment
Share on other sites

hmm, maybe I was over thinking it. If you have your webroot, i.e. htdocs, and you have a folder with html documents in it, like this
/ - index.html - style.css - pages/   - pageA.html   - pageB.html    - pageC.html

then a link from index.html to pageA.html would just be:

<a href='pages/pageA.html">My Link</a>

This was the solution, thanks!Please, now the other topic: an image and text on the same page of a html file?
Link to comment
Share on other sites

You mean as in a filesystem folder?Sort of. You can't directly create a link to a folder in the sense that it will open the folder for viewing. If you exclude the filename from the link (ie, you have a link that looks like this: www.somesite.com/aDirectory/), it will search for a file with one of several names, like index.html, index.php, etc. within that directory.
rememberif you do not have an index.html file (or whatever default your server expects) AND you have directory listing disabled, you will get an error.for exampel try to access http://besidethetrail.ca/demo/If I enable file listing then you would get a list and basically could hack into files on my server.try linking to a LOCAL folder list on your CPU to see what that looks like
<a href="file_folder">local file</a>

presuming file_folder exists in the folder where the current HTML is located....Guy

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...