cgi perl 页面跳转

 

#!C:/strawberry/perl/bin/perl.exe
use CGI;
print "Content-type: text/html/n/n";
$url=$ENV{'REQUEST_URI'};
$len=length($url);
$fxxCode = substr $url, 8, 8;
$pos=index($url,'static');
###print "${url}";
###print "${len}";
###print "${pos}";
###print "${fxxCode}";
if (($len==21) and ($pos==1) ){
   $rurl = "http://www.lwq.com/product/viewProduct.action?fxxCode=".$fxxCode;
   $q = new CGI;
   ###print $q->redirect($rurl);
}
$t=1;
print "/n";

你可能感兴趣的:(cgi,perl,url,c)