Server Side Includes (SSI)
What is SSI? What Does it Do?
If you want to run CGI Scripts automatically when
someone accesses a page or if you would like to add a standard footer
to your pages but you do not want to put the HTML code in every page,
then Server Side Includes are perfect for you.
How to Make the SSI Tags Work
In order for the server to look for the SSI tags, your HTML pages must
have one of the following extensions:
.shtml
.shtm
If you want to run a test.cgi automatically when someone access your
index.html page, do the following:
Rename your index.html file to index.shtml
Add the following somewhere in the index.shtml file:
<!--#exec cgi="/cgi-bin/test.cgi"-->
Save the file and upload it to the server
Access the file and you'll see that the script runs automatically
Do the same if you would like to include a footer, but change
the SSI tag to:
<!--#include virtual="/path/to/file" -->
The /path/to/file is the path from your /htdocs directory.
Example: If the complete URL to your footer page is:
http://www.your-domain.com/misc/footer.html
Then your /path/to/file would be:
<!--#include virtual="/misc/footer.html" -->
If you would like to automatically show when a web page was last
modified, add the following tag to your page:
<!--#echo var="LAST_MODIFIED" -->
More information about all available SSI tags can be found at:
http://www.apache.org/docs/mod/mod_include.html
Personal Assistance
At EsoSoft, Service and Support are our Top Priorities!
If you need any type of personal assistance, do not hesitate to
contact our Service & Support Team at:
support@esosoft.com
A member of our team will be very happy to assist.
For identification purposes, please write from the e-mail address
on-file for your account or include your account's password in your
e-mail message.
Back to Basic Web Hosting Support
|