Local Website on LAN

Discussion in 'Software' started by BrokenArrows, Dec 20, 2005.

  1. BrokenArrows

    BrokenArrows Sergeant

    Im running a local website on my lan for sharing files. It works a hell of alot better than the network explorer thing with windows.

    At the moment whenever i want to add files onto the site i need to move them to the web directory that is being hosted.

    Is there anyway i can link to files on the computer without moving them and still allow people who view the site to download them.

    Im using Apache Tomcat 5.5 for the server.
     
  2. Wookie

    Wookie Sergeant Major

    Well if you use the share name you could link to that from explorer,

    I THINK
    Code:
    <a href="\\Server\ShareName\Filenname.ext">My Share</a>
    
    Should Work
     
  3. BrokenArrows

    BrokenArrows Sergeant

    that wont work because when people are browsing it it end up looking like this

    http://Server/\\Server\ShareName\Filenname.ext

    I can get it working in Internet Explorer by doing this

    <a href = "file:\\Server\ShareName\filename.ext">file</a>

    but that is not compatable with firefox
     
  4. goldfish

    goldfish Lt. Sushi.DC

    HMMM.... if you did that you'd open a HUGE security hole. You'd essentially be giving them read access to any file on the computer, providing they could get your password (which shouldn't be hard, given that you've given them access to read files).

    However if you wrote a PHP script which had a database of some sort (a textfile would do) which you could add specific files to, and map "nicknames" to a real file rather than let them use \\server\sharename\file.ext (which you could modify to be \\server\C$). Somthing like this:
    Code:
    myfile.ext,\\Server\sharename\myfile.ext
    anotherdr,<DIR>
    anotherdir\myotherfile.ext,\\server\sharename\anotherdir\myotherfile.ext
    
    Then your PHP script loads the file and streams it to the client. You'd need to write your own enumeration system though, and all that sort of thing.

    OR you could use a VirtualDirectory located at \\Server\sharename\ to share all files in that share.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds