> Just wondering how I would go about having this URL....
> www.mydomain.com/cgi-bin/test.cgi?data=test
> 
> Would be parsed to...
> 
> www.mydomain.com/cgi-bin/test2.cgi
> 
> From test2.cgi I would like to be able to read that data = test from
test.cgi.

In test.cgi, do the following

=code
use CGI;
my $cgi = new CGI;
my ($domain,$script,$c) = ($cgi->server_name,'/cgi-bin/test2.cgi',0);
my $url = 'http://$domain$script?';
for($cgi->param()) {
  # this if won't be run the first time through the loop
  if($c++) { $url .= '&'; }
  $url .= $_.'='.$cgi->param($_);
}

print "Location:$url\n\n";
=code

It loops over all of the variables passed to your script and re-creates
the query string, then passes it to your new script.

 -dave



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to