Is there a way i can get it to collect the URL parameters and bring
them into the ssi?
The parent url is
The ssi is:
<form action='docsearch.shtml' method='get'>
<!--#exec cgi="/cgi-bin/docsearch.pl-->
</form>
On this page:
http://blogs.msdn.com/david.wang/archive/2005/12/12/Child_URL_Execution_and_SSI_exec_Redux.aspx
it seems to be able to say it is possible:
"One way to work with this on IIS6 is to modify your CGI to take in a
querystring or other parameter from the URL, and for SHTML pages
containing #exec statements to denote the exact URL whose page-counter
you want to increment."
but it doesn't say how you take in the querystring to the ssi.
One guy said he tried this:
<!--#exec cgi="/cgi-bin/docsearch.pl?<!--#echo var="QUERY_STRING" -->"
-->
another this:
<!--#set var="body" value="/cgi-bin/docsearch.pl?${QUERY_STRING}"-->
<!--#exec cgi="${body}" --> ?
another this:
<!--#exec cgi="/cgi-bin/docsearch.pl?${QUERY_STRING}" -->
and another this:
<!--#exec cgi="/cgi-bin/docsearch.pl?$ENV{'QUERY_STRING'}" -->
None of these work.
Any ideas on how I can get the query string into the ssi?
Thanks
Ben
I am not an expert of the SSI implementation on IIS, but I do not
believe what you want is possible - because I do not see a syntax in
SSI implementation on IIS to dereference any parent server variable
values and dynamically pass it to the child URL of the #exec statement.
<!--#exec cgi="/cgi-bin/docsearch.pl?<!--#echo var="QUERY_STRING" -->"
As documented, #echo will write the QUERY_STRING back to the client --
not pass it to the #exec -- so it's not what you want.
<!--#set var="body" value="/cgi-bin/docsearch.pl?${QUERY_STRING}"-->
<!--#exec cgi="${body}" --> ?
<!--#exec cgi="/cgi-bin/docsearch.pl?${QUERY_STRING}" -->
<!--#exec cgi="/cgi-bin/docsearch.pl?$ENV{'QUERY_STRING'}" -->
Now, they may be valid on other web servers running other SSI
implementations, but none of these are valid syntax in SSI
implementation on IIS.
Personally, I suggest changing this to a simple ASP page which will
easily do exactly what you want because it actually has the
functionality you want, by intention, and is supported.
//David
http://w3-4u.blogspot.com
//
Thanks David for your response.
Could you point me to a page which will explain how to run a perl
script from an asp page?
I have tried the format used on:
http://www.wrensoft.com/zoom/support/faq_ssi.html
but whether I have a .pl or .cgi ending it claims that the perl script
is not a valid Win32 application.
My PATH contains F:\Perl\bin\ and my PATHEXT includes .PL;.CGI which
one page seemed to say was required.
If I just run the perl script it runs correctly, with the file
association linked to the Perl command line interpreter.
Thanks for your help,
Ben