Image not showing in index.html

Hey,
I uploaded everything from my hard drive to my webserver. But when I went to see my index.html file, I can’t see any pictures. When I was uploading my files via FTP client (SmartFTP) I noticed the path and it was “public_html/images/nameoftheimage” so I went to my index.html file and looked at the code. The src for the image file was “/images/nameofthefile” Can anyone tell me how I can fix this problem.

On the hard drive, this is what I have:
root folder/images/nameofthefile

I can’t figure out what is wrong. Please help me out. Thanks.

Your FTP URL isn’t the same as the browser URL.

Try just doing “images/nameofthefile” (removing the first forward slash), that should work.

/images acts sort of like _parent in actionscript, it brings you back in the hierarchy 1 directory. images/ targets a directory that is contained in the same directory you are calling the file from.

Is there something I can do that would not include the slash in the front because it is a real pain when you have to edit such a small thing everytime you make a webpage. Thanks so much man for the help.

I hard code my HTML so I never had this problem, but if I may suggest you set up a folder to store all your site content exactly how it would be on your FTP server.

So you would create a folder to act as the main folder.

Inside there you will put your html files and any images or directories.

So lets say your folder name on your computer is “mySite”, inside that folder will be your .html file and a directory called “images” that you will store your images in.

Of course however, when you upload you don’t upload the “mySite” folder itself, you upload the content of it into the public_html area of your FTP.

This is excatly what I have.

On my hard drive:
root folder/images/nameoftheimage
root folder/index.html
root folder/articles/nameofthearticle

On my webserver:
public_html/images/nameoftheimage
public_html/index.html
public_html/articles/nameofthearticle

I don’t know why dreamweaver puts a slash infront of the directory such as “images” or “articles”. If there is a way to fix that in dreamweaver please let me know. I don’t mind hand coding and fixing this small problem but it is a waste of time. If you are kind enough to lend me the solution, I would really appreciate it. Thanks so so so so so much. You guys ROCK!!

I use Dreamweaver as well, and it has never put a forward slash in my file when I have it set up like that (if I used Insert/Image).

So as for it automatically putting it like that, I don’t think it would do that, and if it did I don’t know why.

Thanks. I will see what is happening. Something is wrong with the hyperlinking now.

I have a folder named “articles” where all the html files contain for my articles.

I linked an article like this: articles/nameofthearticle.html to my index page but for some reason it is not working.

Here’s the source: a href=“articles/nameofthearticle.html”>Hello /a
(< & > has not be put there because it would actually create a link)

let me know what is wrong with this hyperlinking.