Forum Moderators: phranque

Message Too Old, No Replies

SSI still doesn't work...why?

         

jaguarr

4:08 pm on Jun 9, 2005 (gmt 0)

10+ Year Member



first I checked to see if mod_include.c is installed using ./apachectl -l and I see mod_include.c listed

then I went to httpd.conf and added some lines. Now starting line 317, it reads:

Directory />
Options +Includes
AddHandler server-parsed .html
AddType text/html html
Options FollowSymLinks
XBitHack on
AllowOverride None
/Directory>

note I put html because the file I want to include is named menu.html

then i restarted apache using ./apachectl restart

in my html file I included menu.html by
<!--#include file="menu.html"-->

I am sure the location is right (menu.html is in the same directory as the parent file)

But it still doesn't work. Could someone please tell me what I did wrong? Thank you very much.

coopster

6:05 pm on Jun 9, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, jaguarr.

Looks like you are missing some opening/closing delimiters ( < > ) there for starters. An example ...

<Directory /usr/local/apache/htdocs/www> 
Options +Includes
AddOutputFilter INCLUDES .html
</Directory>

Also, the virtual attribute should always be used in preference to the file attribute:

<!--#include virtual="menu.html" -->

Span

6:46 pm on Jun 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AddHandler server-parsed .html
... note I put html because the file I want to include is named menu.html

Also, you need to put the extension of the pages you want Apache to parse for SSI directives in the AddHandler line, not the extension of the files you want to include.

jaguarr

8:35 pm on Jun 9, 2005 (gmt 0)

10+ Year Member



Thank you very much.
I got it to work.