Forum Moderators: phranque
Might your problems have something to do with the setup of your server? I recently began using another hosting company with a completely different user interface and a few days ago I managed to get myself shut out of a directory because I inadvertantly had made it protected.
If it is the first time that you try having images in a directory it is quite easy to get confused about the correct path to the image. One way of solving that problem is to avoid relative paths and use absolute paths instead. Something like:
<img src="http://example.com/images/nice-picture.jpg" border="0" width="128" height="132" alt="Short descriptive text about picture">
If this suggestion is of no use please ask again. Perhaps we can even hope for help from more competent members. :)
--example.com (otherwise known as "root folder")
------html (here you store your pages as html/php files)
--------images (here you store your graphics)
----cgi-bin ("root level" folder for cgi/perl etc. scripts)
----admin ("root level" folder for various admin files)
----anon-ftp ("root level" folder upload/download by ftp)
Your site should have a similar structure at least at root level - each host setup varies in names and such, but what works works, so it's all pretty much interchangeable.
So you use an ftp client (like WS_FTP) to upload your html files (also might have .php, .asp, etc. extensions - in any case, the files that hold the markup for the site and its pages) to the "html" folder; and you upload your graphics to the "images" folder.
Within your html files themselves, you call the images (to cause them to display properly on the pages) by use of a path which looks something like this: <img src="images/graphic1.jpg"> In other words, anywhere you need an image to display, you need to include the relevant piece of markup for that image, so that browsers know where to get what you want to show on the page.
If that's still no help, say so and I'll see if I can rephrase it somewhat.
If you don't see a link to your images dir or, within the images dir to the images themselves, then your assumptions about the path to those files is wrong.
If you do see the links in the spots you expect and you click on an image file and it says not found, it's probably a permissions thing (though it should not say not found, but rather access denied).
Tom
- are you sure that you are uploading to "site.com/public_html/images/" and not to "site.com/images/"?
Note that 'public_html' could also be named 'www', 'htdocs' etc etc.
Tom
Well, I am uploading them via ftp, yes...I am uploading them to site.com/public_html/<subdirectory name>/images
images.<website>.com/images/picture.GIF
Do you have your server set up to map this subdomain to the /images directory? Otherwise you would need a path like
"http://website.com/subdir/images.GIF" or
"http://www.website.com/subdir/images.GIF"
I think this has come up already - on *nix systems, path names are case sensitive.
You say you have it set up with no html index page, so that the directory index is just a list of files. You should be able to click on those files/sudirectories until you get to the images. Click on the image and it should come up.
If you don't see a link to your images dir or, within the images dir to the images themselves, then your assumptions about the path to those files is wrong.
If you do see the links in the spots you expect and you click on an image file and it says not found, it's probably a permissions thing (though it should not say not found, but rather access denied).
Tom
Well, I click on the image in the index directory, it goes to it. However, I cannot go to that image with a link? [<subdomain>.<domain>.com...]
[<subdomain>.<domain>.com...]
Then is when it says not found.
Well, I click on the image in the index directory, it goes to it. However, I cannot go to that image with a link?
Is this exactly what you are doing:
- You navigate through your directory structure and you end up in a directory and you see a list of files that are in that directory, including some image files.
- You click on one of those image files and it opens.
- You look at the address bar of your browser when it's actually showing the image and you copy that path - [etc...]
- you paste that into a link in your page in an image tag <img src="http://etc/etc/etc.gif"> or a link to open the image in a new page by itself <a href="http://etc/etc/etc.gif">my fig</a>.
- it gives you a broken link or it says that it cannot find the file.
That sounds like a rewrite issue where it's rewriting depending on the referrer.
Just to verify, though, the above *exactly* describes what's happening?
Tom
Did you put something in place to prevent people hotlinking to your images?
Are you able to put a page on your site with a src link and have it come up or is the image broken?
Tom