When you enable SSI for Apache you do so by associating a MIME type, or a file suffix, with the include module. You do this by making the SSI handler 'server-parsed' be called to handle all requests of the given type.

A common configuration is the following:

AddHandler server-parsed .html Options +Includes

When you setup Apache to execute CGI script you associate the relevent directory, or file suffix (.cgi?) with the CGI handler in a similar manner.

Apache will only run one handler for a given file, and it will be whichever one is setup for that MIME type or suffix.

So you have the choiec - either do the thing as a CGI script by calling your script foo.cgi or write the whole thing as a SSI document and call your script foo.shtml.

The latter approach might be the way for you to go, after all using SSIs you can include the output of an arbitary URL (read CGi script) into your page.

Apache2 allows you to chain handlers together to do what you want, but Apache 1.3.x doesnt.

Steve
---
steve.org.uk

In reply to Re: Server Side Includes with print <<ENDHTML by skx
in thread Server Side Includes with print <<ENDHTML by boat73

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.