PDA

View Full Version : Rank Amateur



outfitter
05-06-2008, 07:31 AM
I don't think a question can get more basic than this: how do I get a jpeg to show up when the public types my URL? I have multiple domain names on one account and want to place an "under construction" jpeg on the home page of one of those URLs. When I upload the Jpeg into the public html section of that domain name the public gets to see an index when the type the URL; the includes the jpeg (which loads when clicked on). How can I make the jpeg appear when the URL is typed without the public having to go through the index?

As I said they don't get more basic than this.

Thank you
Michael:confused:

Bob Barr
05-06-2008, 08:09 AM
To keep the directory's file index from appearing, you'll need to put an HTML file, named 'index.html', into the directory.

To display the .jpg file, you'll need to use the '<img src=' construct in the 'index.html' file, just as you would do to display any other picture.

Early Out
05-06-2008, 08:57 AM
To lay it out in more detail, create an index.html that contains this:


<html>
<head>
<title>Under Construction</title>
</head>
<body>
<img src="worker.jpg">
</body>
</html>
Put that index.html under public_html - that should be enough.

outfitter
05-06-2008, 12:00 PM
Many thanks - now the header says "under construction" and I get the broken picture symbol but the picture doesn't come up. :o

Bob Barr
05-06-2008, 12:09 PM
Many thanks - now the header says "under construction" and I get the broken picture symbol but the picture doesn't come up. :o
Two simple possibilities come to mind:

1. The '.jpg' file isn't where the HTML expects it to be. Is it located in the same directory as the HTML file? If it's in an 'images' subdirectory, you'll need to reflect that in the HTML line like this:

<img src="images/worker.jpg">

2. Does the spelling (including the upper/lower case) of the '.jpg' file's name match the HTML file? Unix is case-sensitive with regard to file names.

outfitter
05-06-2008, 12:51 PM
The jpg is in an images file located in a sub file of the file for my add-on domain. The add-on domain file has the following folders : "cgi-bin" and "images" and the index.html file. The index.html file has this code:
<html>
<head>
<title>Under Construction</title>
</head>
<body>
<img src=“images/beauty.jpg”
</body>
</html>

All the spelling and cases seem to match. The image is there as it open up under "Image Manager". I'm really confused

Bob Barr
05-06-2008, 01:12 PM
I'm really confused
So am I. If the location and the file name are correct, there isn't much left.

The only other possibility that I can think of is that HotLink Protection is turned on and you haven't added the subdomain's URL to the 'allow' list.

outfitter
05-06-2008, 01:46 PM
So am I. If the location and the file name are correct, there isn't much left.

The only other possibility that I can think of is that HotLink Protection is turned on and you haven't added the subdomain's URL to the 'allow' list.

Hot link protection wasn't even enabled - I have now enabled it but the URL is on the allow list. Tis a puzzlement.

outfitter
05-06-2008, 03:00 PM
Problem solved - it was a coding error! This is what did the trick:
<img src="images/beauty.jpg">

Many thanks for all the help

Early Out
05-06-2008, 03:28 PM
Yup, you do need to close that "img" tag, otherwise nasty things happen! :)

Bob Barr
05-06-2008, 03:32 PM
Problem solved - it was a coding error! This is what did the trick:
<img src="images/beauty.jpg">

Many thanks for all the help
Aarrggh!:eek: I looked right past the missing closing tag.