When using SSIs in an HTML (although most documents using SSI use the SHTML extension) document, you are able to achieve dynamic and interactive real-time features such as: echoing current time, conditional execution based on logical comparisons, querying or updating a database, sending an email, etc. All of this can be achieved without programming or CGI scripts (however, SSIs do allow CGI scripts to be easily embedded into a document). SSIs consist of a special sequence of characters(tokens) in a document. As the document is sent from the server to the requesting client, the document is scanned by the server for these special tokens. When a token is found, the server interprets the data in the token and performs an action based on the token data.
Server Side Includes should already be enabled on your site. Most hosting plans have this option enabled by default. If SSIs are not enabled on your site, a quick talk with your hosting service should correct the problem.
If you don't want to talk with your hosting service, or they refuse to do it, you can enable SSIs on your site yourself, if you have root access to your site. Simply create a file named .htaccess and include the following three lines of data, plus an extra carriage return at the end.
Options Indexes FollowSymLinks Includes
AddType application/x-httpd-cgi .cgi
AddType text/x-server-parsed-html .html
If you have SSIs enabled on your site, but you don't want to rename all of your files to use the SHTML extension, you can enable SSIs in normal HTM/HTML files by creating a file called .nsconfig and including the following three lines of data, plus an extra carriage return at the end.
<Files *.htm*>
AddType exp=*.htm* type=magnus-internal/parsed-html
</Files>
This guide is not intended to be an exhaustive guide to SSIs. For more information about this topic, any search engine searching for the term "Server Side Includes" should provide you with more information on SSIs than you ever wanted to know.
Notice: we take no responsibility for any actions you may take with this information. Should this information be used to cause harm to your site, or to breach any sort of contract you have with your hosting provider, you shall be the sole party held responsible for the actions committed with this information.
|
||||||