Forum Home
Press F1
 
Thread ID: 58035 2005-05-19 11:25:00 How to link to a file on webpage? andrew93 (249) Press F1
Post ID Timestamp Content User
356681 2005-05-19 11:25:00 I'm setting up a test website with links to files on my PC that I wish to share over the internet. I'm not sharing files with the public, it's a private webpage that my business partner will access so that he can get the latest versions of files on my PC. I've tried setting this up without success. If I create a link to a sample file, the html looks something like this:
<P><A HREF="fibonacci.txt">Fibonacci</A></P>
The file is in the same directory as the webpage and in testing (just on my PC), I can get the file to open by opening the page and clicking on the link.

If I then host the page (using Simple Server and no-ip) and access my page through an anonymizer (i.e. megaproxy) and open port 80 on my router, I can see the page ok with the link. If I click on the link to the file I get an error - page / file not found.

What am I doing wrong? Is it the html code? Or do I need to open another port (like an ftp port) in my router? I'm a newbie at this sort of stuff and am learning as I go. Any pointers appreciated.

Thanks, Andrew
andrew93 (249)
356682 2005-05-19 11:31:00 Late edit : the latest test resulted in the text within the 'fibonacci' file displaying on a new page - how do I get it to pop up with the open / view / save option instead? (Maybe linking to a purely text file was a bad example....) andrew93 (249)
356683 2005-05-19 11:40:00 You may need to zip the file and use the same code to link to the zip, or put instructions to right click / save link as.... . As far as I know most txt files will open in a browser window, some doc(MS Word) files will also open in a browser window if IE is the browser.

If you figure this out I would also like to know.


....goes off googling....
Rob99 (151)
356684 2005-05-19 11:43:00 Is converting to pdf an option? Rob99 (151)
356685 2005-05-19 21:34:00 PDF's also usually open automatically in the browser, so I would suggest zipping the file and linking to that instead, as that will bring up the open/save dialog box. Mary (6534)
1