You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Douglas C. Heestand" <dh...@macworld.com> on 2001/06/19 00:33:51 UTC

Multiple AddHandler statements

We have a CGI script which dynamically generates a certain page on our site.
We want to include an SSI on that dynamically created page.  Is that
possible?  We have two "AddHandler" statements for files that end in .cgi...

<IfModule mod_mime.c>
    ...
    AddHandler server-parsed .cgi
    ...
</IfModule>

<VirtualHost 192.168.1.1>
    ServerName www.xyz.com
    ... 
    AddHandler cgi-script .cgi
</VirtualHost>

Unfortunately, the dynamically generated page is not being server-parsed
because the Include virtual statement is showing up in the HTML source (the
same statment on a .shtml file, however, is replaced with the result of the
SSI).

Any help would be greatly appreciated.


Re: Multiple AddHandler statements

Posted by Joachim Zobel <nc...@netcologne.de>.
At 15:33 18.06.2001 -0700, you wrote:
>We have a CGI script which dynamically generates a certain page on our site.
>We want to include an SSI on that dynamically created page.  Is that
>possible?  We have two "AddHandler" statements for files that end in .cgi...
>
><IfModule mod_mime.c>
>     ...
>     AddHandler server-parsed .cgi
>     ...
></IfModule>
>
><VirtualHost 192.168.1.1>
>     ServerName www.xyz.com
>     ...
>     AddHandler cgi-script .cgi
></VirtualHost>
>
>Unfortunately, the dynamically generated page is not being server-parsed
>because the Include virtual statement is showing up in the HTML source (the
>same statment on a .shtml file, however, is replaced with the result of the
>SSI).

This is because you can not chain content handlers. One Option would be to 
use Apache::SSI. You can chain PerlHandlers.

But isn't it possible to have one *.shtml, that includes both. This would 
IMHO be the much cleaner solution. The other way you probably end up using 
two different SSI implementations.

Hth,
Joachim

--
"... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden
koennen."                            - Bertolt Brecht - Leben des Galilei