homepage Welcome to WebmasterWorld Guest from 54.205.7.136
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
.htaccess causes dead images
Sean3w




msg:1503359
 5:24 pm on Oct 28, 2003 (gmt 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]

 

jdMorgan




msg:1503360
 5:35 pm on Oct 28, 2003 (gmt 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

Sean3w




msg:1503361
 5:40 pm on Oct 28, 2003 (gmt 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

jdMorgan




msg:1503362
 5:59 pm on Oct 28, 2003 (gmt 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

Sean3w




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

they no longer appear on my pages

jdMorgan




msg:1503364
 6:47 pm on Oct 28, 2003 (gmt 0)

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

(This is a strange problem)

Jim

Sean3w




msg:1503365
 6:51 pm on Oct 28, 2003 (gmt 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.

jdMorgan




msg:1503366
 8:29 pm on Oct 28, 2003 (gmt 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

Monus




msg:1503367
 10:46 pm on Oct 28, 2003 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved