http://qs321.pair.com?node_id=175688

Kozz has asked for the wisdom of the Perl Monks concerning the following question:

I've got a server-parsed html page (say, filename.shtml) which contains an "include virtual" directive that looks like
<!--#include virtual="/cgi-bin/gallery.cgi" -->
If I call this page as
http://domain.tld/filename.shtml?key=value&key2=value2
how can I tell the CGI module to parse the QUERY_STRING from the original REQUEST_URI so that the CGI will behave as if I called it directly as
http://domain.tld/cgi-bin/gallery.cgi?key=value&key2=value2
? Thanks for your help.

Originally posted as a Categorized Question.

Replies are listed 'Best First'.
Re: How do I get CGI Parameters through a server-parsed HTML page?
by merlyn (Sage) on Jun 19, 2002 at 14:32 UTC
    You can't. If you use the deprecated #exec cgi directive rather than #include virtual, then they will be available.

    But why not just have the entire page be generated by CGI? That would make more sense.

Re: How do I get CGI Parameters through a server-parsed HTML page?
by mendeepak (Scribe) on Jun 06, 2013 at 06:07 UTC

    it will be better for you to generate the enitre page by cgi as suggested by merlyn.

    Originally posted as a Categorized Answer.