Home

Return to Knowledge Base Index

 SSI

Great on site SSI: http://www.useforesite.com/tut_ssi.shtml

Tutorial

SSI and what is it for?
Click Here

Note: SSI calls only work on pages with an .shtml extension. 

If you make a new page and name it with the extension .shtml - you don't have to do this part. Changing the MIME type will cause ALL of your .html files to parse for SSI and that's usually not necessary in all cases. 

html files are not parsed for ssi calls on this server unless you create that MIME type.

Changing the MIME type so that .html files will parse for SSI calls
1. Log into your administration suite and click on the MIME Type icon
2. Choose the main www folder (/home/user/domain-www) if it's not chosen already and click the "load" button
3.In the next screen go to the box next to where it says "Mime Type" and you need to put in
text/x-server-parsed-html
4. In the next box where it says "extension" type: .html
Make sure you put the "dot" in front of .html
(if you use .htm instead, type that in place of .html)

That will effectively make the server parse your .html files for ssi calls.  Just a note: This process does slow the loading of your pages slightly.

Using SSI

The simplest example of server-parsed HTML is to have a file "file.shtml" containing this text:

<!--#exec cgi="/cgi-bin/test.cgi"-->


And then have a file "test.cgi" that contains as it's very first line:

#!/usr/bin/perl

Wherever you place the: <!--#exec cgi="/cgi-bin/text.cgi"-->

that is where the information will appear on your page. 

If your include directive is 

<!--#exec cgi="/cgi-bin/test.cgi"-->

then the cgi program you run must output a standard CGI header (Content-type: text/html). Any file named file.shtml will be parsed automatically by Apache on our servers.
Do not put any spaces before the '#' character in your include directives; if you have

<! #exec" the line will be ignored.

Server-side includes in "custom trailers" will not work, since custom trailers are appended to the output of your web pages after all other processing has been done on them. Any server-side includes that you put into your custom trailers will be sent directly to the browser without being parsed.



Home :: Hosting Plans :: Clients
Knowledge Base :: Contact Us