Server Side Includes (SSI)

m
m
 
Line 1: Line 1:
 +
<seo title="Server Side Includes (SSI)" metakeywords="Server Side Includes,SSI,how to SSI,what is SSI" metadescription="Server Side Includes (SSI) " />
 
<div align=justify>In order to use Server Side Includes (http://en.wikipedia.org/wiki/Server_Side_Includes) in your files, they must have .shtml or .shtm extension. Alternatively, adding the following line to your .htaccess will specify different file types that should be checked for such includes:
 
<div align=justify>In order to use Server Side Includes (http://en.wikipedia.org/wiki/Server_Side_Includes) in your files, they must have .shtml or .shtm extension. Alternatively, adding the following line to your .htaccess will specify different file types that should be checked for such includes:
  
Line 5: Line 6:
 
Then you'll be able to add code to your pages that will be processed by the web server. The code should be of the following format:
 
Then you'll be able to add code to your pages that will be processed by the web server. The code should be of the following format:
  
<!--#'<tag><variable set> '-->
+
{{#icon: SSI.png}}
  
 
A brief explanation on SSI structure and work can be found below:
 
A brief explanation on SSI structure and work can be found below:
  
<!--#" is the opening identifier, each SSI code should start with this.
+
{{#icon: SSI2.png}} is the opening identifier, each SSI code should start with this.
  
<tag> specifies the command that can be sent to the server. This can be one of the following: ''echo, include, fsize, flastmod, exec, config , odbc, email, if, goto, label, break.''
+
{{#icon: SSI3.png}} specifies the command that can be sent to the server. This can be one of the following: ''echo, include, fsize, flastmod, exec, config , odbc, email, if, goto, label, break.''
  
<variable set> is a set of variables and their values.
+
{{#icon: SSI4.png}} is a set of variables and their values.
  
--> is the closing tag. Every Server Side Inclusion should end with it.
+
{{#icon: SSI5.png}} is the closing tag. Every Server Side Inclusion should end with it.
  
 
Here is an example of how to include HTML file into a page using SSI:
 
Here is an example of how to include HTML file into a page using SSI:
  
<!--#include virtual="somefile.shtml" -->
+
{{#icon:SSI2.png}}include virtual="somefile.shtml"{{#icon:SSI5.png}}
 
</div>
 
</div>

Latest revision as of 12:08, 20 January 2012

rss feed for my website