Passing parameters from shtml to cgi

Posted By: andla ()
Posted On: 2004-Dec-23 13:00

Hi,

I want to use this link:
<A HREF="page4.shtml?arg1=1&arg2=3">page4.shtml</A>

And in the SSI page I want to use this script:
<!--#exec cgi="/cgi-bin/intellilink.cgi?start=arg1&end=arg2"-->

I suspect on some servers this is done automatically:
<A HREF="page4.shtml?start=1&end=3">page4.shtml</A>
<!--#exec cgi="/cgi-bin/intellilink.cgi"-->
I mean that some server knows how to pass the parameters so intellilink.cgi gets the parameters.

This is not done in IIS on my web host.

I would be grateful for any help on this


Sincerely
Andla



Posted By: andla ()
Posted On: 2004-Dec-23 13:26

Forgot to set email notification.....


Posted By: Prowler (Staff)
Posted On: 2004-Dec-27 07:48

It all depends on the server configuration.

You may try one of the following server environment variables to 'extract' the parameter:

$ENV{'REQUEST_URI'}
$ENV{'HTTP_REFERER'}
$ENV{'REDIRECT_URL'}




Posted By: andla ()
Posted On: 2004-Dec-29 16:30

I want to do this on the SSI page. The perlscript works fine. If i use:
intellilink.cgi?start=1&end=4 then I get the parameters in the CGI script.
If I do the same in the SSI url I cannot pass it to the CGI.

/Andla


Posted By: Prowler (Staff)
Posted On: 2005-Jan-03 14:32

Hmmm. Let's start at the beginning...

Include a print statement or write to a log file - in the CGI to check that the arguments passed by the referrer variable is intact. Sometimes, it gets stripped out. If this is the case, you will have to create a workaround for this situation.