Welcome to WebmasterWorld Guest from 107.20.75.63

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess causes dead images

     
5:24 pm on Oct 28, 2003 (gmt 0)

New User

10+ Year Member

joined:Oct 28, 2003
posts:4
votes: 0


I'm trying to place .htaccess on my site so I can do SSI. But when I put the .htaccess file in there it stops all my images what showing up ni the folder.

here is the code i'm using.

Options Indexes FollowSymLinks Includes
AddType application/x-httpd-cgi .cgi
AddType text/x-server-parsed-html .html

and my site is www.example.com/main/index.shtml

can someone tell me what i need to get my pictures working again

[edited by: jdMorgan at 5:33 pm (utc) on Oct. 28, 2003]
[edit reason] No specific URLs, please [/edit]

5:35 pm on Oct 28, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Is that the entire content of your .htaccess file?

If so, you might want to try adding options instead of replacing them:


Options +Indexes +FollowSymLinks +Includes

Jim
5:40 pm on Oct 28, 2003 (gmt 0)

New User

10+ Year Member

joined:Oct 28, 2003
posts:4
votes: 0


i entered that and it still doesn't work.

now it looks like this
Options +Indexes +FollowSymLinks +Includes
AddType application/x-httpd-cgi .cgi
AddType text/x-server-parsed-html .html

did i mention i'm very new to htaccess

5:59 pm on Oct 28, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


> showing up in the folder.

By this do you mean that you cannot view the folder and see the image filenames, or do you mean that the images in that folder will no longer appear on your web pages after you install a .htaccess file?

Jim

6:27 pm on Oct 28, 2003 (gmt 0)

New User

10+ Year Member

joined:Oct 28, 2003
posts:4
votes: 0


they no longer appear on my pages
6:47 pm on Oct 28, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Are you using a script to serve images, or just simple html <img> links on the pages?

(This is a strange problem)

Jim

6:51 pm on Oct 28, 2003 (gmt 0)

New User

10+ Year Member

joined:Oct 28, 2003
posts:4
votes: 0


just the simple <img>. I know it is too. I've tried .htaccess like year ago and now i don't remember a thing about it but i dont remeber this type of problem.
8:29 pm on Oct 28, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Sean3w,

Unless someone else pitches in on this thread, about the only thing I can suggest is to comment-out the lines in .htaccess, and then add them in one at a time till you can identify which one (or ones) causes the problem.
Adding a "#" character at the beginning of the line will cause Apache to ignore that line.

Jim

10:46 pm on Oct 28, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 23, 2002
posts:82
votes: 0


Very strange that it don't display the images.
I was thinking that it gives a 500 error.

If you want to use server side includes for .html files.
You need to add the follow lines in the .htaccess file.

For Apache version 2.0

AddType text/html .html
AddOutputFilter INCLUDES .html

For Apache version 1.3...

AddType text/html .shtml
AddHandler server-parsed .shtml

I don't know this for sure but I think that the code from 1.3 also works for 2.0