Forum Moderators: phranque

Message Too Old, No Replies

How do I get Apache to parse .SHTML

AddHandler server-parsed not working

         

texmex

6:15 pm on May 27, 2006 (gmt 0)

10+ Year Member



I am trying to get SSI working on my apache server V2.0

My first attempt was just to change the extention of my calling page to .SHTML. This resulted in the content being returned as text/plain.

I then added the following to my .htaccess file


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

The content now comes back as text/html but there is no sign of any server side parsing. My SSI directives are still in the content (evident from view.. source in the browser), but still in their raw form.

eg
<!--#include file="IncludedFile.shtml" -->
or
<!--#include virtual="something.txt" -->

I have tried a host of other commands, but they all just come back in their raw form and are, therefore, treated by the browser as commented out lines of HTML.

So it would appear that AddHandler server-parsed .shtml has had no effect whatsoever. Is there something else I need to configure?

jdMorgan

9:31 pm on May 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You may need to add

Options +Includes

to your .htaccess file.

Ref: [httpd.apache.org...]

Jim

texmex

1:27 am on May 28, 2006 (gmt 0)

10+ Year Member



Jim,
You're a life saver. I have viewed litteraly hundreds of sites on the internet, on this very subject. Not one hint of this setting.

I suppose I really should get to know .htaccess directives more intimately. So far I have learned just bearly enough to implement what I need.

Thanks again.