Tech Topic
 Home  About Us  Sales  Support  What's New  Sitemap
   FAQ Support
   HOW-TO Guides
   System CGI
   Program Docs
   Web Resources
   System Policies
Previous Topic To the FAQ main page Next Topic

FAQ Topic

Answer

085.  Can I use SSI commands?

SSI, or "Server-Side Includes", are available with our accounts. To enable server-side parsing of any document, at least one of the following conditions must be met.

Important Note - If you try more than one of the following techniques at the same time, you may encounter strange results. Please do not try them all at once! For example, if you use .shtml files and mark them executable, your files will not be treated as dynamic, and reloading will not cause the server to re-interpret their SSI. If you are trying to serve dynamic content with SSI, such as rotating ads, this will obviously be a problem.

  1. The file must have an extension of .shtml. This is the recommended method of enabling SSI. Note that the file index.shtml is searched for in a directory if index.html is not found. If you have active links from other sites that specifically mention index.html, however, this won't be a good solution for you.
  2. You must enable something called XBitHack for the directory tree where you want to able to apply SSI to regular .html files.
    This is done by placing the following line in the .htaccess file at the top of the directory tree (normally, in your top Web directory):

                   XBitHack Full

    This causes the Web server to examine each .html file for executable bits. If the owner executable bit is set, the file is parsed as if it were a .shtml file. If the group executable bit is also set, a Last-Modified header is added for the file, which can sometimes adversely affect caching and proxies.
    To set the owner executable bit, use the command chmod u+x filename or chmod 744 filename when logged in via Telnet.
    Via FTP, use quote site exec chmod 744 filename. To also set the group executable bit, use chmod g+x filename or chmod 754 filename.
    See the important note above - do not set executable bits on .shtml files.
  3. In unusual cases, you may want every .html file to be parsed for SSI. This can be done with the following command in your .htaccess file:

                   AddType text/x-server-parsed-html .html

    Note: Please do not do this unless you genuinely intend to use SSI in all of your files. The unnecessary overhead of parsing the files that do not actually use SSI will slow the server down and make your site somewhat less responsive. Also, don't do this for .shtml files; it will make them stop working!

What SSI commands are available?

The SSI commands are documented on the Apache Web site.

[Home] [About Us] [Sales] [Support] [What's New] [Sitemap]

Please contact our Webmaster with questions or comments.

Copyright 1997 IperWeb, Inc. All rights reserved.

Picture