help with href="file question

M

Mark Adams

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.

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

Richard

Mark said:
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">
 
N

Nik Coughin

Richard said:
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.

an html > page. I can see the directory from any machine with
any > machine on the LAN (IE 6 or Netscape 7.1). But when I code
this into an > html page:


with > the tag trying everything I can think of from more slashes
("///") to > different permutations of the pathname.

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.
 
N

Nik Coughin

Mark said:
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.
 
N

Nik Coughin

Nik said:
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.
 
M

Mark Adams

Thanks for the info Nik. See below.

Nik said:
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.

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

Toby A Inkster

Mark said:
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/'.
 
R

Richard

Nik said:
with >> Windows. I'm trying to put together a homepage for my
any >> machine on the LAN (IE 6 or Netscape 7.1). But when I code
with >> the tag trying everything I can think of from more slashes
looking >> at some kind of ftp solution?
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.
 
R

Richard

Alexander Cain wrote:

there's your problem.

Where have I mislead alex?
What purpose does using "File://" have?
Inquiring minds want to know from the html expert alex cain.
 
M

Mark Adams

Toby said:
Mark Adams wrote:




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/'.

I set that Alias (with and without the trailing slash) and then worked
all the permutations of "http://myhost/theshare" that I could think of
with no joy.

After editing commonhttpd.conf do I need to restart Apache? If so, how
do I go about it?

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

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

Nobody knows what goes between his cold toes and his warm ears.
-- Roy Harper

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

Toby A Inkster

Mark said:
After editing commonhttpd.conf do I need to restart Apache? If so, how
do I go about it?

You can restart Apache but easier to tell it to reload the config files.

Open up a terminal and type this command:

su -c 'service httpd reload'

then enter your root password and it should reload.
 
A

Alexander Cain

Richard said:
Alexander Cain wrote:



Where have I mislead alex?


You didn't read the question right as the poster mentioned, dumbass.


What purpose does using "File://" have?
Inquiring minds want to know from the html expert alex cain.


No fucking thank you, st00pid. Answer your own question, you're the one
who seems to like to hang around alt.html.
 
A

Alexander Cain

Richard said:
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.



Holy Wrong Information, Batman!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,283
Latest member
JoannaGrif

Latest Threads

Top