Forum Moderators: phranque

Message Too Old, No Replies

Server Side Include (SSI) not working on .htm files

         

ryan_c

8:27 pm on Jul 27, 2006 (gmt 0)

10+ Year Member



To turn on SSI, according to the documentation (http://httpd.apache.org/docs/1.3/howto/ssi.html.en), I added the following lines in my web server directory in httpd.conf:

Options +Includes
XBitHack on

I also set the execute bit:

chmod +x pagename.html

In my test file (pagename.html), I only add one directive <!--#echo var="DATE_LOCAL" -->.

When I tested it, everything works fine. HOWEVER, when I changed the file name to pagename.htm, SSI didn't work (the original content still displayed)!

I tried to add an AddType line before the "Options +Includes" directive

AddType text/html .html .htm

BUT .htm page didn't work either. I tried another way of using SSI (AddHandler server-parsed .htm), it worked, but not a good solution for our server. Can anyone tell me how to fix that?

Environment: Apache 1.3, Solaris 2.6.

ryan_c

9:20 pm on Jul 27, 2006 (gmt 0)

10+ Year Member



OK, I found the problem. There is a .htaccess in the parent directory that changes the MIME type of .htm files.

jatar_k

9:30 pm on Jul 27, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



that would do it ;)

glad you found it and Welcome to WebmasterWorld