Welcome to WebmasterWorld Guest from 54.167.213.22

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess causes dead images

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

10+ Year Member



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)

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



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)

10+ Year Member



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)

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



> 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)

10+ Year Member



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

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



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)

10+ Year Member



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)

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



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)

10+ Year Member



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

 

Featured Threads

Hot Threads This Week

Hot Threads This Month