SSI (Server Side Include)
Posted by: amitcohen (---.cache.isnet.net)
Date: June 14, 2009 11:44AM

Hi All

I'm developing website that need to be\use ssi
suffix: *.shtml

Unfotunatley, it doesn't work on my localhost.

Is there anything that missing in my WAMP Server installation?
Should it be an add-on?

How can I fix that problem?

Thanks for you help

Amit

www.amit-cohen.com

Options: ReplyQuote
Re: SSI (Server Side Include)
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: June 14, 2009 11:51AM

You'll need to manually configure Apache for Sever Side Includes.

Read the Apache documentation for enabling SSI here
[httpd.apache.org]

To edit Apaches configuration left click WAMP taskbar icon and choose Apache > httpd.conf

You will need to restart the Apache service after making any changes.



Edited 1 time(s). Last edit at 06/14/2009 11:52AM by c2dan.

Options: ReplyQuote
Re: SSI (Server Side Include)
Posted by: amitcohen (---.cache.isnet.net)
Date: June 14, 2009 02:05PM

Hi c2dan

Thank you for replaying so quick ;-)

I have followed you instructions and on the httpd.conf I found this two rows:

#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

I have chang them to:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml


And am happy to say that I can see my index.shtml as active page.

But unfortunatley, the file menu.ssi does not showing on the index page
I'm sure that I'm using the right code to call to the file:

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

I believe the problem is related to the [ Options +Includes ]

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml


But I just couldn't understand what to do with it. sad smiley

Where this line should be sited within my httpd.conf file?

Can you enlighten me?


Thanks
Amit.

www.amit-cohen.com



Edited 1 time(s). Last edit at 06/14/2009 02:08PM by amitcohen.

Options: ReplyQuote
Re: SSI (Server Side Include)
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: June 14, 2009 04:39PM

Open your httpd.conf and go to line 218 which should be like the following

Options Indexes FollowSymLinks

Now add Includes to the end of the line. Like so

Options Indexes FollowSymLinks Includes

Save httpd.conf and restart Apache.

Options: ReplyQuote
Re: SSI (Server Side Include)
Posted by: amitcohen (---.cache.isnet.net)
Date: June 14, 2009 04:56PM

Hi c2dan

Its working winking smiley

Thank so much for your quick & accurate explanation.


All the best,

Amit

www.amit-cohen.com

Options: ReplyQuote


Sorry, only registered users may post in this forum.