SSI (Server Side Includes) are directives that are placed in HTML pages, and evaluated on the server while the pages are being served. Its use to add dynamically generated content to an existing HTML page.
SSI configurations
We must have mod_include module installed and enabled on apache. Also need to have the following directive either in your httpd.conf file, or in a .htaccess file:
Options +Includes
This tells Apache that you want to permit files to be parsed for SSI directives.
It always better to tell Apache that which files should be parsed. There are two ways to do this. We can configure to parse any file with a particular file extension, such as .shtml, with the following directives:
AddType text/html .shtml
AddHandler server-parsed .shtml
One disadvantage to this approach is that if you wanted to add SSI directives to an existing page, you would have to change the name of that page in order to give it a .shtml extension.
The other method is to use the XBitHack directive:
XBitHack on
XBitHack tells Apache to parse files for SSI directives if they have the execute bit set. So, to add SSI directives to an existing page, rather than having to change the file name, you would just need to make the file executable using chmod.
chmod +x pagename.html
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.