Apache and Metacard

andu undo at cloud9.net
Tue May 20 23:02:00 EDT 2003


Just figured out a little Apache2 fake embedding trick.
Apache2 has a module called mod_include, here is what it says in the manual:
"This module provides a filter which will process files before they are 
sent to the client. The processing is controlled by specially formatted 
SGML comments, referred to as elements. These elements allow conditional 
text, the inclusion of other files or programs, as well as the setting and 
printing of environment variables."

The interesting part is that having something like:

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

or

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

or

 <!--#include virtual="/cgi-bin/test.cgi?argument=value" -->

 can insert some processed data in an html reply just before it's sent to 
the client. There's probably more to it but you get the idea.
Also it requires compiling Apache with the proper modules and some work in 
the config file but that's what manuals are for;-).


Regards, Andu Novac



More information about the metacard mailing list