SSI Technic

阅读更多
SSI Technic

1. What are SSI
SSI(Server Side Includes) are directives that are placed in HTML pages. They let you add dynamically generated content
to an existing HTML page, without having to serve the entire page via a CGI program, or other dynamic technology.

2. Configuring your server to permit SSI
SSI will use mod_include. So we should first enable this module on my ubuntu system.
>sudo a2enmod include

Change the configuration
>cd /etc/apache2/sites-available
>vi default

             Options Indexes FollowSymLinks MultiViews +Includes
             AllowOverride None
             Order allow,deny
             allow from all
             AddType text/html .shtml
             AddOutputFilter  INCLUDES .shtml


3. sample html files to manage the layout of htmls
desk.shtml:


E-Menu



This is the body





And the other 2 files are as follow, header.shtml, footer.shtml:
This is footer


This is header


4. sample html files to show the parameters
env.shtml:


desk.shtml:

Hello,

references:
http://httpd.apache.org/docs/2.2/howto/ssi.html
http://jumu013.blog.163.com/blog/static/10316130020092310439198/
http://ubuntu.flowconsult.at/en/apache2-ssi-installation/
http://steveyoung.wordpress.com/2007/02/04/apache2-ssi-server-side-includes/

你可能感兴趣的:(Ubuntu,WordPress,HTML,Apache,CGI)