Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - help with href="file question

 
Thread Tools Search this Thread
Old 02-08-2004, 09:57 PM   #1
Default help with href="file question


I've never done any html coding on a linux platform, but a little with
Windows. I'm trying to put together a homepage for my intranet that my
kids can use. Server is Mandrake 9.2 with Apache 2.0.47. The other
machines are either WinXP Pro or Win2K Pro.

I want to be able to load a file directory of my public share in an html
page. I can see the directory from any machine with
"file://adamsmdk/mnt/nt3/shared" in a browser address field from any
machine on the LAN (IE 6 or Netscape 7.1). But when I code this into an
html page:

<a href="file://adamsmdk/mnt/nt3/shared"><img
src="/icons/hrddrv.gif" name="Graphic2" align="left" width="32"
height="32" border="0">Access local file stores.</a>

I get nothing. The browser doesn't respond at all. I've diddled with
the tag trying everything I can think of from more slashes ("///") to
different permutations of the pathname.

Can anybody tell me where I'm going wrong here? Do I need to be looking
at some kind of ftp solution?

Thanks.
--
Mark E. Adams, 2004 -- drop the "dot" to email me.

CONSIDER: ===========---------,,,,,,,,,............. . . . . .

People often find it easier to be a result of the past than a cause of
the future.

=====================---------,,,,,,,,,............. . . . . .




Mark Adams
  Reply With Quote
Old 02-09-2004, 02:22 AM   #2
Richard
 
Posts: n/a
Default Re: help with href="file question

Mark Adams wrote:

> I've never done any html coding on a linux platform, but a little with
> Windows. I'm trying to put together a homepage for my intranet that my
> kids can use. Server is Mandrake 9.2 with Apache 2.0.47. The other
> machines are either WinXP Pro or Win2K Pro.


> I want to be able to load a file directory of my public share in an html
> page. I can see the directory from any machine with
> "file://adamsmdk/mnt/nt3/shared" in a browser address field from any
> machine on the LAN (IE 6 or Netscape 7.1). But when I code this into an
> html page:


> <a href="file://adamsmdk/mnt/nt3/shared"><img
> src="/icons/hrddrv.gif" name="Graphic2" align="left" width="32"
> height="32" border="0">Access local file stores.</a>


> I get nothing. The browser doesn't respond at all. I've diddled with
> the tag trying everything I can think of from more slashes ("///") to
> different permutations of the pathname.


> Can anybody tell me where I'm going wrong here? Do I need to be looking
> at some kind of ftp solution?


Remove the "file" from the location.
That's only needed on your local machine and not allowed in html.

<a href="path1/path2/filename.jpg">

This assumes that path1 is in the same directory as the html file is.
otherwise use <a href="http://www.domain.com/path1/path2/filename.jpg">


  Reply With Quote
Old 02-09-2004, 02:54 AM   #3
Nik Coughin
 
Posts: n/a
Default Re: help with href="file question

Richard wrote:
> Mark Adams wrote:
>
> > I've never done any html coding on a linux platform, but a little

> with > Windows. I'm trying to put together a homepage for my
> intranet that my > kids can use. Server is Mandrake 9.2 with Apache
> 2.0.47. The other > machines are either WinXP Pro or Win2K Pro.
>
> > I want to be able to load a file directory of my public share in

> an html > page. I can see the directory from any machine with
> > "file://adamsmdk/mnt/nt3/shared" in a browser address field from

> any > machine on the LAN (IE 6 or Netscape 7.1). But when I code
> this into an > html page:
>
> > <a href="file://adamsmdk/mnt/nt3/shared"><img
> > src="/icons/hrddrv.gif" name="Graphic2" align="left" width="32"
> > height="32" border="0">Access local file stores.</a>

>
> > I get nothing. The browser doesn't respond at all. I've diddled

> with > the tag trying everything I can think of from more slashes
> ("///") to > different permutations of the pathname.
>
> > Can anybody tell me where I'm going wrong here? Do I need to be

> looking > at some kind of ftp solution?
>
> Remove the "file" from the location.
> That's only needed on your local machine and not allowed in html.
>
> <a href="path1/path2/filename.jpg">
>
> This assumes that path1 is in the same directory as the html file is.
> otherwise use <a
> href="http://www.domain.com/path1/path2/filename.jpg">


If you read his question properly you will find that he is trying to make an
intraweb for use on his local machine.


  Reply With Quote
Old 02-09-2004, 02:59 AM   #4
Nik Coughin
 
Posts: n/a
Default Re: help with href="file question

Mark Adams wrote:
> I've never done any html coding on a linux platform, but a little with
> Windows. I'm trying to put together a homepage for my intranet that my
> kids can use. Server is Mandrake 9.2 with Apache 2.0.47. The other
> machines are either WinXP Pro or Win2K Pro.
>
> I want to be able to load a file directory of my public share in an
> html page. I can see the directory from any machine with
> "file://adamsmdk/mnt/nt3/shared" in a browser address field from any
> machine on the LAN (IE 6 or Netscape 7.1). But when I code this into
> an html page:
>
> <a href="file://adamsmdk/mnt/nt3/shared"><img
> src="/icons/hrddrv.gif" name="Graphic2" align="left" width="32"
> height="32" border="0">Access local file stores.</a>
>
> I get nothing. The browser doesn't respond at all. I've diddled with
> the tag trying everything I can think of from more slashes ("///") to
> different permutations of the pathname.
>
> Can anybody tell me where I'm going wrong here? Do I need to be
> looking at some kind of ftp solution?
>
> Thanks.


Hi Mark

Try <a
href="http://123.123.123.123/mnt/nt3/shared"><imgsrc="/icons/hrddrv.gif"
name="Graphic2" align="left" width="32" height="32" border="0">Access local
file stores.</a>

Where 123.123.123.123 is the IP address of the machine you are trying to
access on the network.


  Reply With Quote
Old 02-09-2004, 03:02 AM   #5
Nik Coughin
 
Posts: n/a
Default Re: help with href="file question

Nik Coughin wrote:
> Mark Adams wrote:
>> I've never done any html coding on a linux platform, but a little
>> with Windows. I'm trying to put together a homepage for my intranet
>> that my kids can use. Server is Mandrake 9.2 with Apache 2.0.47. The
>> other machines are either WinXP Pro or Win2K Pro.
>>
>> I want to be able to load a file directory of my public share in an
>> html page. I can see the directory from any machine with
>> "file://adamsmdk/mnt/nt3/shared" in a browser address field from any
>> machine on the LAN (IE 6 or Netscape 7.1). But when I code this into
>> an html page:
>>
>> <a href="file://adamsmdk/mnt/nt3/shared"><img
>> src="/icons/hrddrv.gif" name="Graphic2" align="left" width="32"
>> height="32" border="0">Access local file stores.</a>
>>
>> I get nothing. The browser doesn't respond at all. I've diddled
>> with the tag trying everything I can think of from more slashes
>> ("///") to different permutations of the pathname.
>>
>> Can anybody tell me where I'm going wrong here? Do I need to be
>> looking at some kind of ftp solution?
>>
>> Thanks.

>
> Hi Mark
>
> Try <a
> href="http://123.123.123.123/mnt/nt3/shared"><imgsrc="/icons/hrddrv.gif"
> name="Graphic2" align="left" width="32" height="32" border="0">Access
> local file stores.</a>
>
> Where 123.123.123.123 is the IP address of the machine you are trying
> to access on the network.


Except you would want it to be more like http://123.123.123.123/shared, with
shared being a virtual directory pointing at adamsmdk/mnt/nt3/shared. Don't
know how you would do that in Apache.


  Reply With Quote
Old 02-09-2004, 03:12 AM   #6
Mark Adams
 
Posts: n/a
Default Re: help with href="file question

Thanks for the info Nik. See below.

Nik Coughin wrote:
> Nik Coughin wrote:
>
>>Mark Adams wrote:
>>
>>>I've never done any html coding on a linux platform, but a little
>>>with Windows. I'm trying to put together a homepage for my intranet
>>>that my kids can use. Server is Mandrake 9.2 with Apache 2.0.47. The
>>>other machines are either WinXP Pro or Win2K Pro.
>>>
>>>I want to be able to load a file directory of my public share in an
>>>html page. I can see the directory from any machine with
>>>"file://adamsmdk/mnt/nt3/shared" in a browser address field from any
>>>machine on the LAN (IE 6 or Netscape 7.1). But when I code this into
>>>an html page:
>>>
>>><a href="file://adamsmdk/mnt/nt3/shared"><img
>>> src="/icons/hrddrv.gif" name="Graphic2" align="left" width="32"
>>> height="32" border="0">Access local file stores.</a>
>>>
>>>I get nothing. The browser doesn't respond at all. I've diddled
>>>with the tag trying everything I can think of from more slashes
>>>("///") to different permutations of the pathname.
>>>
>>>Can anybody tell me where I'm going wrong here? Do I need to be
>>>looking at some kind of ftp solution?
>>>
>>>Thanks.

>>
>>Hi Mark
>>
>>Try <a
>>href="http://123.123.123.123/mnt/nt3/shared"><imgsrc="/icons/hrddrv.gif"
>>name="Graphic2" align="left" width="32" height="32" border="0">Access
>>local file stores.</a>
>>
>>Where 123.123.123.123 is the IP address of the machine you are trying
>>to access on the network.

>
>
> Except you would want it to be more like http://123.123.123.123/shared, with
> shared being a virtual directory pointing at adamsmdk/mnt/nt3/shared. Don't
> know how you would do that in Apache.
>
>


Right. When I set it up that way I get a "404 File not Found". I don't
know what to do about it either. I'm off to find an Apache resource.

Thanks again.
--
Mark E. Adams, 2004 -- drop the "dot" to email me.

CONSIDER: ===========---------,,,,,,,,,............. . . . . .

Support Bingo, keep Grandma off the streets.

=====================---------,,,,,,,,,............. . . . . .


  Reply With Quote
Old 02-09-2004, 03:16 AM   #7
Alexander Cain
 
Posts: n/a
Default Re: help with href="file question


"Nik Coughin" <nrkn!no-spam!@woosh.co.nz> wrote in message
news:rDCVb.38582$...
> Richard wrote:
> > Mark Adams wrote:
> >
> > > I've never done any html coding on a linux platform, but a little

> > with > Windows. I'm trying to put together a homepage for my
> > intranet that my > kids can use. Server is Mandrake 9.2 with Apache
> > 2.0.47. The other > machines are either WinXP Pro or Win2K Pro.
> >
> > > I want to be able to load a file directory of my public share in

> > an html > page. I can see the directory from any machine with
> > > "file://adamsmdk/mnt/nt3/shared" in a browser address field from

> > any > machine on the LAN (IE 6 or Netscape 7.1). But when I code
> > this into an > html page:
> >
> > > <a href="file://adamsmdk/mnt/nt3/shared"><img
> > > src="/icons/hrddrv.gif" name="Graphic2" align="left" width="32"
> > > height="32" border="0">Access local file stores.</a>

> >
> > > I get nothing. The browser doesn't respond at all. I've diddled

> > with > the tag trying everything I can think of from more slashes
> > ("///") to > different permutations of the pathname.
> >
> > > Can anybody tell me where I'm going wrong here? Do I need to be

> > looking > at some kind of ftp solution?
> >
> > Remove the "file" from the location.
> > That's only needed on your local machine and not allowed in html.
> >
> > <a href="path1/path2/filename.jpg">
> >
> > This assumes that path1 is in the same directory as the html file is.
> > otherwise use <a
> > href="http://www.domain.com/path1/path2/filename.jpg">

>
> If you read his question properly



there's your problem.



  Reply With Quote
Old 02-09-2004, 06:51 AM   #8
Toby A Inkster
 
Posts: n/a
Default Re: help with href="file question

Mark Adams wrote:

> Right. When I set it up that way I get a "404 File not Found". I don't
> know what to do about it either. I'm off to find an Apache resource.


You want to use an "Alias" in /etc/httpd/conf/commonhttpd.conf

A line like:

Alias /shared/ /mnt/nt3/shared/

Will set 'http://localhost/shared/' to point to '/mnt/nt3/shared/'.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

  Reply With Quote
Old 02-09-2004, 06:56 AM   #9
Jeff Thies
 
Posts: n/a
Default Re: help with href="file question

> Except you would want it to be more like http://123.123.123.123/shared,
with
> shared being a virtual directory pointing at adamsmdk/mnt/nt3/shared.

Don't
> know how you would do that in Apache.


Wouldn't it be easier just to make a symbolic link? Or is that on one of the
windows boxes?

Jeff
>
>



  Reply With Quote
Old 02-09-2004, 07:42 AM   #10
Richard
 
Posts: n/a
Default Re: help with href="file question

Nik Coughin wrote:

> Richard wrote:
>> Mark Adams wrote:
>>
> >> I've never done any html coding on a linux platform, but a little

> with >> Windows. I'm trying to put together a homepage for my
>> intranet that my > kids can use. Server is Mandrake 9.2 with Apache
>> 2.0.47. The other > machines are either WinXP Pro or Win2K Pro.
>>
> >> I want to be able to load a file directory of my public share in

>> an html > page. I can see the directory from any machine with
> >> "file://adamsmdk/mnt/nt3/shared" in a browser address field from

> any >> machine on the LAN (IE 6 or Netscape 7.1). But when I code
>> this into an > html page:
>>
> >> <a href="file://adamsmdk/mnt/nt3/shared"><img
> >> src="/icons/hrddrv.gif" name="Graphic2" align="left" width="32"
> >> height="32" border="0">Access local file stores.</a>

>>
> >> I get nothing. The browser doesn't respond at all. I've diddled

> with >> the tag trying everything I can think of from more slashes
>> ("///") to > different permutations of the pathname.
>>
> >> Can anybody tell me where I'm going wrong here? Do I need to be

> looking >> at some kind of ftp solution?
>>
>> Remove the "file" from the location.
>> That's only needed on your local machine and not allowed in html.
>>
>> <a href="path1/path2/filename.jpg">
>>
>> This assumes that path1 is in the same directory as the html file is.
>> otherwise use <a
>> href="http://www.domain.com/path1/path2/filename.jpg">


> If you read his question properly you will find that he is trying to make
> an intraweb for use on his local machine.


Even so, the file:// is not really needed.
The html looks at the directory path and sees that there is no other
destination possible, so it assumes that the source is local and therefor
seeks out the path from within it's current location.
Regardless of the fact it is on the internet server or a local machine.

using http://www simply tells html that the source will be from a domain
name. That domain name could also be your computer.



  Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump