Server Side Includes
Server Side Includes is an extrememly useful and time-saving
tool. It can allow you to incorporate the contents of a file in other documents
simply by placing a reference to that file in the documents, thus avoiding
the work of entering in all the information numerous times. This can be
especially helpful if you have information that appears the same in numerous
documents, such as footers and headers. When changing the contents of the
included file, the change is propogated immediately into all the documents
that contained a reference to that file.
To allow server side includes on your web server, you should first familiarize
yourself with the configuration files for your web server which is based
on Apache 1.2.6 software. An excellent on-line resource can be found at
the Apache Web Site. See also
the books we have recommended to the right.
To allow server side includes from any html file in any directory do the
- Uncomment out the following "AddType"
directive in the ~/www/conf/httpd.conf
file on your Virtual Server:
AddType text/x-server-parsed-html .html
You may want to add a Type for .htm files:
AddType text/x-server-parsed-html .htm
- Add an Includes
option to the
Options for your Root Document declaration in the
Options Indexes FollowSymLinks Includes
- Restart your web server:
You can also learn about Server Side Includes in some of the Web
Server Configuration and Web
Security books we list.