mattur

msg:3639934 | 11:29 pm on May 1, 2008 (gmt 0) |
Hi Senmar50 You've accidentally stuck the "a" link and "img" tags together into one tag (!) Should be something like: <a href="large_picts/img22.html" target="_self"><img src="image2/theater.jpg"></a> You might want to add height and width attributes on your image tags and, for accessibility/user friendliness, alt attributes too, for example: <img src="image2/theater.jpg" height="100" width="200" alt="your brief description of the image">
|
Senmar50

msg:3642233 | 7:52 pm on May 5, 2008 (gmt 0) |
Hi Mattur, Thanks so much for your help. My pages passed w3c validation. Question: Would it be wise to place an (index.html) page in the images folder for security purposes? Visitors won't be able to see the content, if they click on the image directory. Should the index.html just say "KEEP OUT" or you have entered a secure area of this web site. Thanks Again, SenMar50
|
limbo

msg:3642235 | 7:54 pm on May 5, 2008 (gmt 0) |
Or you could use .htaccess to protect your directories.
|
g1smd

msg:3642237 | 7:57 pm on May 5, 2008 (gmt 0) |
Be aware that your image URLs are relative. This can cause problems, as it is the browser that resolves the path to that file. I prefer to use URLs that begin with a "/" and therefore count from the root.
|
Senmar50

msg:3642255 | 8:22 pm on May 5, 2008 (gmt 0) |
Thank you both.... My images url's are relative. They do begin with "../images". I have to read up on the (.htaccess). I remember trying the (.htaccess) in the past on a folder, and it didn't work; or I just screwed up. I'm going to read up on it, and give it a try. Thanks again. You folks are always on point. SenMar50
|
Senmar50

msg:3642364 | 10:51 pm on May 5, 2008 (gmt 0) |
Hi, I tried the .htacess method, and the content of the folder is still exposed. Here is my .htacess file. I placed the file in the image folder. <Files .htaccess> ErrorDocument 404 "<b>Page Not Found</b><p /><br /><a href="../index.html">Return to the homepage</a> order allow,deny deny from all </Files> I tried another one: <Files .htaccess> ErrorDocument 403 /403.html ErrorDocument 400 /400.html ErrorDocument 500 /500.html order allow,deny deny from all </Files> What am I doing wrong.. Thanks in advance, SenMar50 (P.S. The "index.html" works perfectly) :-)
|
g1smd

msg:3642431 | 12:45 am on May 6, 2008 (gmt 0) |
For links ../ is not the same as /. I use / only. . Does this do anything useful for you... # Protect certain files from being web accessible. IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* As far as I know, the ErrorDocument directives shouldn't be anywhere near those either...
|
encyclo

msg:3642439 | 1:12 am on May 6, 2008 (gmt 0) |
Note that you will get a fuller answer to the .htaccess questions in the Apache forum [webmasterworld.com], but you should not be wrapping the rules in a <Files> container, as that would limit the scope th the .htaccess file only, which would make no sense. :) To turn off all directory indexes, you can just add: Options -Indexes to a root-level .htaccess file. :)
|
henry0

msg:3643344 | 9:44 pm on May 6, 2008 (gmt 0) |
adding to mattur | <img src="image2/theater.jpg" height="100" width="200" alt="your brief description of the image"> |
| you also need adding img title
|
thecoalman

msg:3643419 | 12:36 am on May 7, 2008 (gmt 0) |
Placing an index.html file only prevents a listing of the files in the folder. index.html and a few others depending on the server configuration are default pages served when someone types in www.example.com/somefolder/ if there is no default page there the contents of the directory will be shown or as encyclo pointed out you could just turn this option off for all folders. In any case none of these methods would prevent anyone from accessing the images directly via a correct URL. Using index.html is just a easy way to prevent the directory listing.
|
Senmar50

msg:3643444 | 1:38 am on May 7, 2008 (gmt 0) |
Thanks for the help everyone! Thecoldman, I do understand what you're saying about index.html as my method for preventing folder content from being indexed. But, that's all I knew how to do....until "Limbo" introduced .htaccess to me. I read up on the subject and was able to prevent my files from being indexed. Here's what I did: Created a .htaccess file; removed the "txt" extention before uploading to server. My .htaccess file: (in image folder) <Files .htaccess> order allow,deny deny from all </Files> # Protect certain files from being web accessible. IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* IndexIgnore * ///////////////////////////////////////// Results when folder clicked: Index of /myweb/myimages Apache/x.x.xx Server at www.#*$!#*$!#*$!#*$!.com Port xx ///////// I know I have a lot more to learn about .htaccess, but this is a start, and I thnk you all. Sincerely, SenMar50
|
g1smd

msg:3644348 | 12:17 am on May 8, 2008 (gmt 0) |
Add this too: Options -Indexes
|
|