Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

How do I get CGI Parameters through a server-parsed HTML page?

by Kozz (Friar)
on Jun 19, 2002 at 14:09 UTC ( [id://175688]=perlquestion: print w/replies, xml ) Need Help??

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://175688]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-19 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found