I have been trying to use Server Side Includes on my website to save time writing code and be able to change site wide elements quickly and easily.

However i cannot seem to get them to work, either locally or on the Server.

I have set them up as .html files (with only the code needed and no html or body tags) in a "ssi" folder and am calling them in the appropriate locations in my .shtml files with:

<!--#include virtual="/ssi/<filename>.html" -->

but still nothing. Any ideas?

Accepted Answer

Is it Apache? Perhaps includes are not even enabled.

http://httpd.apache.org/docs/2.2/howto/ssi.html

To permit SSI on your server, you must have the following directive either in your httpd.conf file, or in a .htaccess file:

Options +Includes

Written by dalbaeb
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki