Solved

src for image file on html doc

Posted on 2000-04-11
10
189 Views
Last Modified: 2010-04-09
i have an index.html file on my domain.
below that index.html file i have a folder called cgi-bin, within that a folder called bmp and within that a file called logo24.bmp.

when i put in the following in the src box for the image on my index.html page:
cgi-bin/images/bmp/logo24.bmp

it changes to this as soon as i leave the box:file://C:\Nth\webpublish\nthtechnologies-www\cgi-bin\bmp\logo24.bmp

why is it doing that?  I know this is a stupid question, but maybe i havent gotten the directory tree structure thru my thick skull or something...

thx
0
Comment
Question by:arthurcid
  • 6
  • 4
10 Comments
 
LVL 1

Accepted Solution

by:
Smacked earned 50 total points
ID: 2706384
is your cgi-bin below the root of the webserver. (they usually are) if so then something could be freaking out.

As well, the cgi-bin dir should really only be used for cgi's or binary files
not storing images.

the cgi-bin is a special directory with special permissions and uses as far as the web server is concerned.

a request for an img in the cgi-bin directory may not be interpreted as that but rather a request to execute that image (not possible). there maybe some default return for such instanes which returns the server path for that image. (if this is the case then it's quite a big security issue)
0
 

Author Comment

by:arthurcid
ID: 2706399
when i put this in the source:
<IMG alt="Nth Tech" height=305 src="images\image1.gif" width=392 >

i see this in the file properties (right mouse) in the browser at 'runtime':
http://www.nthtechnologies.com/images/image1.gif

which does not, you will notice, use the cgi-bin subfolder as you mentioned above

so im still at a loss, sorry if i seem slow on this, web language is not my forte, vb is... sorry
0
 

Author Comment

by:arthurcid
ID: 2706407
also, by the way, that last comment was NOT meant to sound sarcastic, what i was really saying was that since you mentioned not using the cgi-bin folder, i moved everything up.

i now have an index.html at

http://www.nthtechnologies.com/index.html

which you should be able to view in your browser

i also have a folder below that one called images and a file in that folder called image1.gif

0
 

Author Comment

by:arthurcid
ID: 2706413
if you right mouse and choose properties on the image that will most definitely not display properly in your browser, then you can see the 'source' i have it set to...

thx for your help
0
 
LVL 1

Expert Comment

by:Smacked
ID: 2706500
<IMG alt="Nth Tech" height=305 src="/nthtechnologies-www/images/image1.gif" width=392>

shouldn't work

try

<IMG alt="Nth Tech" height=305 src="/images/image1.gif" width=392>

and i'll bet u a grade A answer it does work
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Expert Comment

by:Smacked
ID: 2706501
<IMG alt="Nth Tech" height=305 src="/nthtechnologies-www/images/image1.gif" width=392>

shouldn't work

try

<IMG alt="Nth Tech" height=305 src="/images/image1.gif" width=392>

and i'll bet u a grade A answer it does work
0
 

Author Comment

by:arthurcid
ID: 2706520
no, it didnt work.

go to the page now and right mouse on the 'broken' image and choose properties...

you will see

http://www.nthtechnologies.com/images/image1.gif

as the source and it doesnt work

also, a note, when i sign on to ftp my root directory has the following dir in it:
nthtechnologies-www

however, my index page is in THAT folder, so i assume it is by default the 'root'

but that is why i had it the other way, so just so you know, i tried it both ways (actually many ways) with the gif file located all over the place and couldnt get a valid image to show

hmmm, i dont get it, it shouldnt be this hard...hehe
0
 

Author Comment

by:arthurcid
ID: 2706522
nevermind, i got it working

i didnt realize that:

Image1.gif

and

image1.gif

were two different things..

DOH

sorry
0
 
LVL 1

Expert Comment

by:Smacked
ID: 2706531
okay
the way it should be is

\(root directory)
\index.html
\images\image1.gif

the nthtechnologies-www dir should be the parent of the images directory and it should also be the root directory.

the images directory should be the child of the nthtechnologies-www (root) directory.

one other thing
the src is set to
"/images/image1.gif"
if the above doesn't help then try making the source
"images/image1.gif"

the difference being that the path doesn't start the root

the way that works is the server will look for a directory called "images" in the same directory as the index.html file

i'm probably insulting your intelligence now (sorry)

tell me how u go. i'm at work for another 2/1/2 hours still
0
 

Author Comment

by:arthurcid
ID: 2709903
worked just fine, so in other words, i can just ignore the nthtechnologies-www directory and just treat it as the root by definition, correct?

Also, does that mean as i get the page more involved with cgi and such that i should in ALL cases not have to ever refer to the nthtechnologies-www folder, right?
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now