Home > Web Development > Server Side Includes (SSI)

Server Side Includes (SSI)

August 30th, 2007

Server Side Include can be used to allow insertion of an HTML into another. e.g. header or footer can be separated from pages so you only have to change a single file to update the header/footer on all pages of your site.

Here‘s a fairly good introduction to SSI although it does miss a few important points:

  • If you are using .htaccess to enable SSI for a single folder you may want to add couple of extra lines:
    Options Indexes FollowSymLinks Includes
    AddType application/x-httpd-cgi .cgi
    AddType text/x-server-parsed-html .html
  • A better option is to use the XBitHack:
    1. Remove from .htaccess anything else relating to SSI
    2. add XBitHack on
    3. set the HTML file (i.e. the one containing the include statement) to be executable (e.g. chmod +x pagename.html)
Categories: Web Development Tags:
Comments are closed.